php-src/ext/spl
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
..
tests Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
config.m4 Autotools: Normalize headers arguments (#15149) 2024-07-29 10:08:17 +02:00
config.w32 ext/spl: Remove spl_engine.h header (#14418) 2024-06-08 23:46:34 +01:00
CREDITS
php_spl_arginfo.h Do not generate frameless info items when func info generation is disabled 2024-02-18 11:39:00 +01:00
php_spl.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
php_spl.h Clean-up some more headers (#14416) 2024-06-08 17:15:36 +01:00
php_spl.stub.php Fix rc info of iterator_to_array (#9080) 2022-07-21 15:05:34 +02:00
spl_array_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_array.c Use zend_std_build_properties() to access zend_object.properties 2024-07-18 22:18:38 +02:00
spl_array.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_array.stub.php Typed constants in SPL extension (#12358) 2023-10-07 13:14:57 +01:00
spl_directory_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_directory.c Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
spl_directory.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_directory.stub.php Replace @deprecated by #[\Deprecated] for internal functions / class constants (#14750) 2024-07-10 16:47:31 +02:00
spl_dllist_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_dllist.c Use zend_std_build_properties() to access zend_object.properties 2024-07-18 22:18:38 +02:00
spl_dllist.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_dllist.stub.php Typed constants in SPL extension (#12358) 2023-10-07 13:14:57 +01:00
spl_exceptions_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_exceptions.c ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_exceptions.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_exceptions.stub.php Generate ext/spl class entries from stubs 2021-02-18 13:01:51 +01:00
spl_fixedarray_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_fixedarray.c ext/spl: Follow-up on GH-9704 (#15295) 2024-08-08 19:31:51 +01:00
spl_fixedarray.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_fixedarray.stub.php ext/spl: Follow-up on GH-9704 (#15295) 2024-08-08 19:31:51 +01:00
spl_functions.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
spl_functions.h ext/spl: Remove unused typedef 2024-06-15 01:33:09 +01:00
spl_heap_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_heap.c Merge branch 'PHP-8.3' 2024-07-23 16:34:16 -06:00
spl_heap.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_heap.stub.php Use true as return types for SplHeap (#13147) 2024-01-15 10:09:38 +00:00
spl_iterators_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_iterators.c ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_iterators.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_iterators.stub.php Typed constants in SPL extension (#12358) 2023-10-07 13:14:57 +01:00
spl_observer_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
spl_observer.c Merge branch 'PHP-8.3' 2024-07-06 23:58:37 +02:00
spl_observer.h ext/spl: Remove some useless header includes and clarify usages 2024-06-15 01:33:09 +01:00
spl_observer.stub.php Implement SeekableIterator for SplObjectStorage (#13665) 2024-05-05 13:26:54 +02:00