php-src/ext/fileinfo
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
..
libmagic Merge branch 'PHP-8.3' 2024-07-11 16:40:39 +02:00
tests Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
config.m4 Add pcre as a configure step dependency to fileinfo (#15349) 2024-08-12 00:17:29 +02:00
config.w32 Add pcre as a configure step dependency to fileinfo (#15349) 2024-08-12 00:17:29 +02:00
create_data_file.php Fix bug #65106: PHP fails to compile ext/fileinfo 2024-03-22 15:00:15 +01:00
CREDITS It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
data_file.c Fix bug #65106: PHP fails to compile ext/fileinfo 2024-03-22 15:00:15 +01:00
fileinfo_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
fileinfo.c Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
fileinfo.stub.php Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
generate_patch.sh Make ext/fileinfo/generate_patch.sh simpler to use (#14941) 2024-07-13 22:38:43 +02:00
libmagic.patch Sync PHP_FILEINFO_UNCOMPRESS #if/ifdef/defined (#14525) 2024-06-10 08:11:25 +02:00
magicdata.patch Update libmagic to 5.45 (#13369) 2024-02-13 21:11:57 +01:00
Makefile.frag Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
php_fileinfo.h fileinfo: Introduce php_libmagic.* to simplify patch 2022-10-02 03:02:47 +02:00
php_libmagic.c ext/fileinfo: Fix [-Wsign-compare] warnings 2024-06-06 16:18:23 +01:00
php_libmagic.h Remove redundant win32/unistd.h includes (#14533) 2024-06-11 09:47:23 +02:00