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

AddMethodCallBasedStrictParamTypeRector: Support changing protected methods in final classes #4611

Merged
merged 7 commits into from
Jul 27, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 27, 2023

No description provided.

@staabm staabm marked this pull request as ready for review July 27, 2023 07:00
@staabm
Copy link
Contributor Author

staabm commented Jul 27, 2023

I think the failling build is not related to the PR seems like a temporary problem which no longer reproduces

if (! $method->isPrivate()) {
$isPrivate =
($node->isFinal()
&& $node->extends === null
Copy link
Member

@samsonasik samsonasik Jul 27, 2023

Choose a reason for hiding this comment

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

$node->implements empty should be checked as well, also probably used by/from trait.

service from Parent override guard or FamilyTree services may be can be used for this case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point. added a test-case and fixed it

Copy link
Contributor Author

@staabm staabm Jul 27, 2023

Choose a reason for hiding this comment

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

I did not use the suggested services, as I think pure AST based decision are more reliable right now

Copy link
Member

Choose a reason for hiding this comment

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

Ok, lets use this as initial support and then we can improve later with verify parent FullyQualified->toString() is autoloaded

@samsonasik samsonasik merged commit 0b96adb into rectorphp:main Jul 27, 2023
42 checks passed
@samsonasik
Copy link
Member

Thank you @staabm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants