Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
nielsdos merged 1 commit into php:master from DanielEScherzer:reflection-constant-extension
Nov 9, 2024

Conversation

Copy link
Member

@DanielEScherzer DanielEScherzer commented Oct 25, 2024

No description provided.

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.

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?

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.

DanielEScherzer reacted with thumbs up emoji

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

DanielEScherzer reacted with thumbs up emoji
@nielsdos nielsdos linked an issue Oct 25, 2024 that may be closed by this pull request
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

Copy link
Member Author

<rebased, conflicts with #15847>

nielsdos reacted with thumbs up emoji

Copy link
Member

nielsdos commented Nov 9, 2024

No one complained, I'm merging this.

DanielEScherzer reacted with thumbs up emoji

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

nielsdos commented Nov 9, 2024

Thanks!

DanielEScherzer reacted with thumbs up emoji

@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
Reviewers

@nielsdos nielsdos nielsdos approved these changes

@Girgias Girgias Girgias approved these changes

@kocsismate kocsismate Awaiting requested review from kocsismate kocsismate is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add ReflectionConstant::getExtension()

AltStyle によって変換されたページ (->オリジナル) /