Skip to content

Fix bug #81474: Make ReflectionAttribute non-final #7545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ext/reflection/php_reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6618,7 +6618,6 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */

INIT_CLASS_ENTRY(_reflection_entry, "ReflectionAttribute", class_ReflectionAttribute_methods);
reflection_init_class_handlers(&_reflection_entry);
_reflection_entry.ce_flags |= ZEND_ACC_FINAL;
reflection_attribute_ptr = zend_register_internal_class(&_reflection_entry);

REGISTER_REFLECTION_CLASS_CONST_LONG(attribute, "IS_INSTANCEOF", REFLECTION_ATTRIBUTE_IS_INSTANCEOF);
Expand Down
2 changes: 1 addition & 1 deletion ext/reflection/php_reflection.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ private function __clone(): void {}
private function __construct() {}
}

final class ReflectionAttribute
class ReflectionAttribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any possible BCs doing this? If not, go ahead 👍

{
public function getName(): string {}
public function getTarget(): int {}
Expand Down
2 changes: 1 addition & 1 deletion ext/reflection/php_reflection_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6849bff1f2b343df4bd7e6da9c8adc555731e2d3 */
* Stub hash: 6e98777552147f4a413db16ecd87c9a6931f9c00 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0)
Expand Down
10 changes: 0 additions & 10 deletions ext/reflection/tests/ReflectionAttribute_final.phpt

This file was deleted.