-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make Reflection(Attribute|Enum|EnumBackedCase) non-final #7520
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
Conversation
As requested in https://bugs.php.net/bug.php?id=81474: BetterReflection would like to extend these classes to provide adaptors. As our other Reflector classes are non-final, I think it makes sense to make these non-final as well.
@krakjoe @ramsey @patrickallaert Any objections to doing this? |
This makes sense to me. Was there a design reason they were made |
Let's check with @iluuu1994 and @Crell on that... though I think they are final because we tend to make all new classes final by default. |
Fine with me. Like you said, I made them final because I didn't think there was a good reason not to. |
@@ -696,7 +696,7 @@ private function __construct() {} | |||
} | |||
|
|||
/** @not-serializable */ | |||
final class ReflectionAttribute implements Reflector | |||
class ReflectionAttribute implements Reflector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReflectionAttribute
exists since PHP 8.0, can we target this version as per https://bugs.php.net/bug.php?id=81474#1632553296 comment?
Seems reasonable.
…On Monday, 27 September 2021, Michael Voříšek ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ext/reflection/php_reflection.stub.php
<#7520 (comment)>:
> @@ -696,7 +696,7 @@ private function __construct() {}
}
/** @not-serializable */
-final class ReflectionAttribute implements Reflector
+class ReflectionAttribute implements Reflector
ReflectionAttribute exists since PHP 8.0, can we target this version as
per https://bugs.php.net/bug.php?id=81474#1632553296 comment?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7520 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARB52Q2IAY6NDTKVIZ3VW3UECZWRANCNFSM5E2XGUGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I didn't even realize they were final. I generally don't care for final classes, so no objection to de-finalizing them. |
As requested in https://bugs.php.net/bug.php?id=81474:
BetterReflection would like to extend these classes to provide
adaptors. As our other Reflector classes are non-final, I think
it makes sense to make these non-final as well.