php-src/ext/zend_test
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 ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308) 2024-08-09 15:51:07 +01:00
config.m4 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
config.w32 Add gc and shutdown callbacks to ZendMM custom handlers (#13432) 2024-06-19 19:43:57 +02:00
fiber_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
fiber.c Change getThis() into ZEND_THIS where possible (#13641) 2024-03-08 22:19:06 +01:00
fiber.h Flexible fiber bailout handling (#7163) 2021-06-18 11:01:10 -05:00
fiber.stub.php Add support for validation of missing class synopses (#9472) 2022-09-05 14:21:15 +02:00
iterators_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
iterators.c general signatures discrepencies fixes (#13122) 2024-01-10 22:19:23 +00:00
iterators.h adds failing test case for #12060 2023-09-05 10:23:22 +01:00
iterators.stub.php adds failing test case for #12060 2023-09-05 10:23:22 +01:00
object_handlers_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
object_handlers.c Zend: Add tests for offsets and containers (#12723) 2024-01-25 15:06:59 +00:00
object_handlers.h ext/zend_test: Move object handler test objects to their own file (#11852) 2023-08-02 18:52:55 +01:00
object_handlers.stub.php Zend: Add tests for offsets and containers (#12723) 2024-01-25 15:06:59 +00:00
observer.c Merge branch 'PHP-8.3' 2024-04-08 15:25:00 +02:00
observer.h Fix memory_leak in zend_test 2022-07-30 15:57:08 +00:00
php_test.h Add gc and shutdown callbacks to ZendMM custom handlers (#13432) 2024-06-19 19:43:57 +02:00
test_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
test.c RFC: Add #[\Deprecated] Attribute (#11293) 2024-07-02 09:44:25 +02:00
test.stub.php RFC: Add #[\Deprecated] Attribute (#11293) 2024-07-02 09:44:25 +02:00
zend_mm_custom_handlers.c Add gc and shutdown callbacks to ZendMM custom handlers (#13432) 2024-06-19 19:43:57 +02:00
zend_mm_custom_handlers.h Add gc and shutdown callbacks to ZendMM custom handlers (#13432) 2024-06-19 19:43:57 +02:00