php-src/ext/tokenizer
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 [RFC] Property hooks (#13455) 2024-07-14 11:55:03 +02:00
.gitattributes Collapse more generated files in PRs (#8754) 2022-06-12 10:56:35 +02:00
config.m4 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
config.w32 Remove unsynced and unused HAVE_<extension> defines (#14233) 2024-05-18 14:10:47 +02:00
CREDITS
Makefile.frag Generate tokenizer_data.c from zend_language_parser.y 2021-05-27 14:35:05 +02:00
php_tokenizer.h Declare ext/tokenizer constants in stubs (#9148) 2022-08-01 10:50:56 +02:00
tokenizer.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
tokenizer.stub.php Declare ext/tokenizer constants in stubs (#9148) 2022-08-01 10:50:56 +02:00
tokenizer_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
tokenizer_data.c [RFC] Property hooks (#13455) 2024-07-14 11:55:03 +02:00
tokenizer_data.stub.php [RFC] Property hooks (#13455) 2024-07-14 11:55:03 +02:00
tokenizer_data_arginfo.h [RFC] Property hooks (#13455) 2024-07-14 11:55:03 +02:00
tokenizer_data_gen.php Clean-up some more headers (#14416) 2024-06-08 17:15:36 +01:00