Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PropertyInfo] Fix multi phpdoc covered promoted properties #46611

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 2 commits into from
Jun 10, 2022

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Jun 7, 2022

Q A
Branch? 6.1
Bug fix? yes
Tickets Fix #46550
License MIT

I came up with this solution

@simPod simPod requested a review from dunglas as a code owner June 7, 2022 08:38
@carsonbot carsonbot added this to the 6.2 milestone Jun 7, 2022
@simPod simPod changed the base branch from 6.2 to 6.1 June 7, 2022 08:38
@carsonbot
Copy link

Hey!

I think @Korbeil has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

/cc @ostrolucky in case you can come up with another failing test case? or is this robust enough?

@ostrolucky
Copy link
Contributor

With this, maybe my patch at #46453 is not necessary anymore?

@ostrolucky
Copy link
Contributor

Going to answer my own comment

if (self::MUTATOR === $source && !$this->filterDocBlockParams($phpDocNode, $property)) {
    return null;
}

this guard can now indeed by removed, since you added more generic solution.

ostrolucky and others added 2 commits June 10, 2022 09:48
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
@simPod
Copy link
Contributor Author

simPod commented Jun 10, 2022

Indeed, cool

@nicolas-grekas
Copy link
Member

Thank you @simPod.

@nicolas-grekas nicolas-grekas merged commit bf255fa into symfony:6.1 Jun 10, 2022
@nicolas-grekas
Copy link
Member

And thank you @ostrolucky also.

@simPod simPod deleted the property-info branch June 10, 2022 09:37
@fabpot fabpot mentioned this pull request Jun 26, 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.

4 participants