-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
DoctrineTargetEntityStringToClassConstantRector
should keep self::class
#8081
Comments
DoctrineTargetEntityStringToClassConstantRector
should keep selfDoctrineTargetEntityStringToClassConstantRector
should keep self::class
Hi, the screenshot shows 3 rules being active at the same time. Could you re-run your local I made a test fixture for only What's your minimal |
In the end I skipped this rule and everything is fine, even when skipping the other mentioned rules and activating only the I enabled all the three rules here, but still no error: Not sure if the demo really gets, that it is a Doctrine entity class... 🤔 |
My test fixture is passing well, and demo is working the same 👍 Could you share minimal |
I will try, but gave some more hints in |
@TomasVotruba @OskarStark it already resolved in PR: please use rector dev-main |
Ah, I see :) I'll make a new release then. Thanks @samsonasik 👍 |
Thanks 👏 |
Bug Report
self::class
should not be refactoredMinimal PHP Code Causing Issue
I tried to reproduce the error in a demo here:
https://getrector.com/demo/f95978a5-496b-4e3a-bcfe-e8fe06141988
but it does not refactor anything, while in my code I see:
Expected Behaviour
self::class is valid and should be kept, because if this gets refactored to
App\Entity\Deadline
, my PHP-CS-Fixer comes and fixes it back toself::class
, so I end up in an infinite loop.I am unable to create a failing test case :-(
The text was updated successfully, but these errors were encountered: