Skip to content

Add ReflectionConstant::getExtension() and ::getExtensionName() #16603

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

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

DanielEScherzer
Copy link
Member

No description provided.

@nielsdos
Copy link
Member

In favor.
I'm just not sure we need both a getExtension and getExtensionName method as we can trivially get the name from a ReflectionExtension with only a few extra keystrokes.
I'm also not too sure about the string|false return.

@DanielEScherzer
Copy link
Member Author

In favor. I'm just not sure we need both a getExtension and getExtensionName method as we can trivially get the name from a ReflectionExtension with only a few extra keystrokes. I'm also not too sure about the string|false return.

I have no problem removing the name getter, but the request at #16571 included it noting that there is both a getExtension() and getExtensionName() for ReflectionClass and ReflectionFunction, so only having one of them might be a bit odd. Perhaps the getExtensionName() methods on the others should be deprecated?

@nielsdos
Copy link
Member

No this PR is fine. It's more important to be consistent with what we have; even if it's a bit odd.
I wouldn't want to deprecate those as it doesn't cause harm.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

Nice work, only 2 nits.

@DanielEScherzer DanielEScherzer changed the title GH-16571: add ReflectionConstant::getExtension() and ::getExtensionName() Add ReflectionConstant::getExtension() and ::getExtensionName() Oct 25, 2024
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

Seems fine to me, but let's wait a bit for others to chime in

@nielsdos nielsdos linked an issue Oct 25, 2024 that may be closed by this pull request
@nielsdos
Copy link
Member

No reaction yet; perhaps shoot a quick email to the mailing list with a link to this PR to see if anyone objects. If no one complains we can just merge it.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

LGTM, looks like an oversight

@DanielEScherzer DanielEScherzer force-pushed the reflection-constant-extension branch from e310657 to 59949e3 Compare November 1, 2024 07:19
@DanielEScherzer
Copy link
Member Author

<rebased, conflicts with #15847>

@nielsdos
Copy link
Member

nielsdos commented Nov 9, 2024

No one complained, I'm merging this.

@nielsdos nielsdos merged commit 10f1f92 into php:master Nov 9, 2024
9 of 10 checks passed
@nielsdos
Copy link
Member

nielsdos commented Nov 9, 2024

Thanks!

@DanielEScherzer DanielEScherzer deleted the reflection-constant-extension branch November 9, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ReflectionConstant::getExtension()
3 participants