Movatterモバイル変換


[0]ホーム

URL:


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

Replace get_class() calls by ::class#47401

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

deguif
Copy link
Contributor

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

Replaceget_class() by::class

@stof
Copy link
Member

I'm really not convinced that$object::class is more readable thanget_class($object). I would be in favor of keeping the usage ofget_class

yceruto reacted with thumbs up emoji

@deguifdeguifforce-pushed theget_class_to_class_keyword-cs-rule branch from7bf01b2 to32eded8CompareAugust 26, 2022 15:16
@nicolas-grekas
Copy link
Member

nicolas-grekas commentedAug 26, 2022
edited
Loading

I like the change personally. It gives a consistent syntax to get the class of something. Once used to it, we won't want to get back :)

artyuum, OskarStark, alamirault, ste93cry, xabbuh, and lyrixx reacted with thumbs up emoji

@fabpotfabpotforce-pushed theget_class_to_class_keyword-cs-rule branch from32eded8 to675601bCompareSeptember 1, 2022 02:03
@fabpot
Copy link
Member

Thank you@deguif.

@fabpotfabpot merged commit0be39ad intosymfony:6.2Sep 1, 2022
@deguifdeguif deleted the get_class_to_class_keyword-cs-rule branchSeptember 1, 2022 03:51
PhilETaylor pushed a commit to PhilETaylor/symfony that referenced this pull requestSep 6, 2023
This PR was squashed before being merged into the 6.2 branch.Discussion----------Replace get_class() calls by ::class| Q             | A| ------------- | ---| Branch?       | 6.2| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       || License       | MIT| Doc PR        |Replace `get_class()` by `::class`Commits-------675601b Replace get_class() calls by ::class
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestMay 29, 2025
This PR was merged into the 6.4 branch.Discussion----------Replace `get_class()` calls by `::class`This change was made in symfony codebase in 2022symfony/symfony#47401.I think we can use same rule in our examplesCommits-------65599c4 Replace get_class() calls by ::class
nicolas-grekas added a commit that referenced this pull requestMay 30, 2025
This PR was merged into the 7.4 branch.Discussion----------Replace `get_class()` calls by `::class`| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->| License       | MITReplace `get_class()` by `::class`It was already done in past in#47401Commits-------e0a602b Replace get_class() calls by ::class
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot requested changes

@derrabusderrabusderrabus approved these changes

@chalasrchalasrchalasr approved these changes

@artyuumartyuumartyuum approved these changes

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@wouterjwouterjAwaiting requested review from wouterjwouterj is a code owner

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

@OskarStarkOskarStarkAwaiting requested review from OskarStarkOskarStark is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.2
Development

Successfully merging this pull request may close these issues.

8 participants
@deguif@stof@nicolas-grekas@fabpot@derrabus@chalasr@artyuum@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp