-
Notifications
You must be signed in to change notification settings - Fork 94
SymfonyLevelSetList::UP_TO_SYMFONY_43 is too aggressive toward CacheInterface
#390
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
Comments
Hi, thanks for reporting. What was the original change in Symfony that invoke this? |
The set reports symfony/symfony#29236 a few rows above as a comment. That change makes some sense in a Symfony-only context, but if my code is to stay interoperable leveraging PSR-16, this rule will break that interop. |
I see. This is a pickle as Rector can upgrade only A → B deterministics cases, so it will require bit hacking to get through :) If you need to upgrade Symfony, but just somewhere, you can comment out this line, apply the upgrade set for Symfony 4.3, then change the cache classes yourself where needed. Then remove the Symfony 4.3 upgrade set and continue to Symfony 4.4 👍 |
Thank you for the suggestion. Is there though a way to remove the 4.3 set without having to renounce to the whole |
If you need different behavior. Not really. The best practice is to use those sets only for upgrade, not in long-term. |
This will help avoid these issues: rectorphp/rector-src#5477 |
Resolved inhttps://github.com//pull/574 |
The
SymfonyLevelSetList::UP_TO_SYMFONY_43
level set includes aRenameClassRector
configuration for PSR-6'sCacheInterface
, which is definitely too aggressive:rector-symfony/config/sets/symfony/symfony43.php
Line 61 in d1e6641
This acts on any possible PSR-16 that I may have in my codebase, breaking them; also, since it's a
RenameClassRector
and not a specific rector, I cannot disable it in any way, apart from loosing any other possible renameRenameClassRector
on that class.Is there any workaround? What can I do?
The text was updated successfully, but these errors were encountered: