Skip to content
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

InlineConstructorDefaultToPropertyRector Readonly Class #5085

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

beschoenen
Copy link
Contributor

PHP Parser does not mark properties as readonly when the class itself is readonly. Therefor we also need to check the class if it's readonly.

This feels like a bug in PHP-Parser though, so I've also opened an issue there. nikic/PHP-Parser#949

@staabm
Copy link
Contributor

staabm commented Sep 27, 2023

could you add a unit test for the case you are talking about?

@beschoenen
Copy link
Contributor Author

@staabm Added

@TomasVotruba
Copy link
Member

TomasVotruba commented Sep 27, 2023

Looks good 👍 Thank you

@TomasVotruba TomasVotruba merged commit 5fb68b4 into rectorphp:main Sep 27, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants