php-src/ext/date
Máté Kocsis 8d12f666ae
Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
..
lib Updated to version 2024.1 (2024a) 2024-02-02 10:23:36 +00:00
tests fixes #13773: DatePeriod does not take microseconds into account 2024-08-21 10:57:46 +01:00
config0.m4 Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
config.w32 Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
CREDITS
php_date_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
php_date.c fixes #13773: DatePeriod does not take microseconds into account 2024-08-21 10:57:46 +01:00
php_date.h Fixed int32 underflow on DateTime::createFromTimestamp (#12775) 2024-02-27 14:01:49 +00:00
php_date.stub.php Deprecate date_sunrise and date_sunset constants (#12978) 2024-08-04 20:07:52 +02:00