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

[TypeInfo] Fix@var tag reading for promoted properties#59963

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

mtarld
Copy link
Contributor

QA
Branch?7.2
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#59959
LicenseMIT

Read either@param and@var tags for promoted properties.

OskarStark reacted with eyes emoji
@mtarldmtarldforce-pushed thefix/var-promoted-property branch from6275905 to3291bf3CompareMarch 12, 2025 15:42
Copy link
Member

@alexandre-dauboisalexandre-daubois left a comment

Choose a reason for hiding this comment

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

You also seem to do something with@return, does this also need an additional test?

@mtarld
Copy link
ContributorAuthor

@alexandre-daubois, the@return is already implemented and tested. There is a bit of refactoring but nothing has really changed.

alexandre-daubois reacted with thumbs up emoji

@chalasr
Copy link
Member

Is there any reference about using@var for constructor property promotion?
Mixing both@var and@param looks horrific to me. I'd think this is one of the use cases where one hits the limits of promoted properties and should just separate the property declaration from the constructor parameter. Am I wrong?

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Is there any reference about using@var for constructor property promotion?

@var is well supported for (promoted or not) arguments - we're even going to use it in#58771 as it provides better locality.

Mixing both@var and@param looks horrific to me.

It is, and should be avoided :)

@nicolas-grekas
Copy link
Member

Thank you@mtarld.

@nicolas-grekasnicolas-grekas merged commit9f7257e intosymfony:7.2Mar 13, 2025
11 checks passed
@mtarldmtarld deleted the fix/var-promoted-property branchMarch 13, 2025 12:51
@fabpotfabpot mentioned this pull requestMar 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@alexandre-dauboisalexandre-dauboisalexandre-daubois approved these changes

@jack-wormanjack-wormanAwaiting requested review from jack-worman

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

6 participants
@mtarld@chalasr@nicolas-grekas@alexandre-daubois@jack-worman@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp