Skip to content

Leverage class name literal on object #47752

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
Dec 2, 2022

Conversation

tigitz
Copy link
Contributor

@tigitz tigitz commented Sep 30, 2022

Q A
Branch? 6.2
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

Rational

PHP RFC: Allow ::class on objects

More specifically

As it is syntactically similar to a class constant access, programmers intuitively expect the syntax $object::class to work as well and provide the same result as get_class($object). This RFC proposes to allow that syntax.

@fabpot fabpot modified the milestones: 6.2, 6.3 Nov 1, 2022
@tigitz tigitz force-pushed the class-name-on-object branch from eea7b65 to eb09c54 Compare November 30, 2022 19:05
@tigitz tigitz force-pushed the class-name-on-object branch from eb09c54 to 44c7c58 Compare November 30, 2022 19:11
@tigitz
Copy link
Contributor Author

tigitz commented Nov 30, 2022

@Koc @nicolas-grekas Updated and rebased on 6.3, test failure seems unrelated, ready to be reviewed/merged. Thanks 🙏

@fabpot
Copy link
Member

fabpot commented Dec 2, 2022

Thank you @tigitz.

@fabpot fabpot merged commit dce37b8 into symfony:6.3 Dec 2, 2022
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.

5 participants