-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
[Php80] Handle parent with typed param on AddParamBasedOnParentClassMethodRector #1455
Conversation
I think the solution is when parent has type, child should not has type so it safe to apply, ref https://3v4l.org/4Mgrt |
When user wants it to work on php 7.1 too, there is |
All checks have passed 🎉 @TomasVotruba it is ready for review. |
63c817d
to
d7d69a7
Compare
rebased. |
That would not work now, as the interface must be explicitly mentioned as unsafe. |
...Method/AddParamBasedOnParentClassMethodRector/Fixture/fixture_has_parent_typed_param.php.inc
Outdated
Show resolved
Hide resolved
These errors usually means that node reprint of original tokens failed. PhpParser tried to keep original formatting and guesses the original position of tokens. Sometimes the node changes, but tokens don't refresh. The |
rules/Php80/Rector/ClassMethod/AddParamBasedOnParentClassMethodRector.php
Outdated
Show resolved
Hide resolved
All checks have passed 🎉 @TomasVotruba I think it is ready. Note:
|
I've added commit that include the original node example that I meant. See if it's ok |
@TomasVotruba thank you, that solve it, I moved to separate method to fix phpstan a200007 |
Close-reopen to restart CI build |
All checks have passed 🎉 @TomasVotruba I think it is ready. |
Thank you 👍 |
When parent class has typed param:
It currently produce internal php-parser error:
this PR try to solve it.