-
-
Notifications
You must be signed in to change notification settings - Fork 429
[AutoImport] Allow on FQCN current same class (part 2) #7235
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
Conversation
|
phpstan notice on packages phpstan is unrelated, I will ignore/fix there first ... |
|
All checks have passed 🎉 @TomasVotruba I am merging it to have faster feedback to test ;) |
|
This PR breaks within TYPO3 Rector for PHP 7.4. See sabbelasichon/typo3-rector#4673 @TomasVotruba It appears only on PHP 7.4. I can't reproduce it on PHP 8 anymore. The problem is shown here: https://3v4l.org/OWiEF#v8.0.0 -> "" -> strtolower works https://3v4l.org/OWiEF#v7.4.33 -> false -> strtolower throws an exception |
|
|
||
| $shortNameLowered = $fullyQualifiedObjectType->getShortNameLowered(); | ||
| $fullyQualifiedObjectTypeNamespace = strtolower( | ||
| substr($fullyQualifiedObjectType->getClassName(), 0, -strlen($fullyQualifiedObjectType->getShortName()) - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samsonasik is the last -1 really correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into it
|
Fixed and released 2.2.1 for it |
This is rework of PR: