Skip to content

Commit e286313

Browse files
sasezakinikic
authored andcommitted
Fix bug #81474: Make ReflectionAttribute non-final
This backports phpGH-7520 to PHP 8.0. Closes phpGH-7545.
1 parent 57a32c6 commit e286313

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ PHP NEWS
2929
- PCRE:
3030
. Fixed bug #81424 (PCRE2 10.35 JIT performance regression). (cmb)
3131

32+
- Reflection:
33+
. ReflectionAttribute is no longer final. (sasezaki)
34+
3235
- SPL:
3336
. Fixed bug #80663 (Recursive SplFixedArray::setSize() may cause double-free).
3437
(cmb, Nikita, Tyson Andre)

ext/reflection/php_reflection.c

-1
Original file line numberDiff line numberDiff line change
@@ -6618,7 +6618,6 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
66186618

66196619
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionAttribute", class_ReflectionAttribute_methods);
66206620
reflection_init_class_handlers(&_reflection_entry);
6621-
_reflection_entry.ce_flags |= ZEND_ACC_FINAL;
66226621
reflection_attribute_ptr = zend_register_internal_class(&_reflection_entry);
66236622

66246623
REGISTER_REFLECTION_CLASS_CONST_LONG(attribute, "IS_INSTANCEOF", REFLECTION_ATTRIBUTE_IS_INSTANCEOF);

ext/reflection/php_reflection.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ private function __clone(): void {}
653653
private function __construct() {}
654654
}
655655

656-
final class ReflectionAttribute
656+
class ReflectionAttribute
657657
{
658658
public function getName(): string {}
659659
public function getTarget(): int {}

ext/reflection/php_reflection_arginfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6849bff1f2b343df4bd7e6da9c8adc555731e2d3 */
2+
* Stub hash: 6e98777552147f4a413db16ecd87c9a6931f9c00 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0)

ext/reflection/tests/ReflectionAttribute_final.phpt

-10
This file was deleted.

0 commit comments

Comments
 (0)