]> granicus.if.org Git - php/commitdiff
Make ReflectionType an abstract class
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 2 Sep 2019 13:38:17 +0000 (15:38 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 2 Sep 2019 13:38:56 +0000 (15:38 +0200)
This is never instantiated directly, only child classes are used.

ext/reflection/php_reflection.c

index d31a99bd3fd51c895abbd828ae3127b736f56271..5cc023831eae22d344c26d3cad0cf016316f92ef 100644 (file)
@@ -6790,6 +6790,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
        INIT_CLASS_ENTRY(_reflection_entry, "ReflectionType", reflection_type_functions);
        reflection_init_class_handlers(&_reflection_entry);
        reflection_type_ptr = zend_register_internal_class(&_reflection_entry);
+       reflection_type_ptr->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
 
        INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", reflection_named_type_functions);
        reflection_init_class_handlers(&_reflection_entry);