Please add support for Rector 2.x
Opened this issue · 2 comments
Since the magento-coding-standard uses Rector 1.x which in turn requires Phpstan 1.x it is currently not possible to use the latest versions of those tools in conjunction with this package. See also latest versions of bitExpert/phpstan-magento.
I have had a look at the upgrade instructions and extending the range of supported rector versions should be possible without code changes, ie incomposer.json change
"rector/rector": "^1.2.4",
to
"rector/rector": "^1.2.4 || ^2.0.0",
AbstractScopeAwareRector is not used
https://github.com/search?q=repo%3Amagento%2Fmagento-coding-standard%20AbstractScopeAwareRector&type=code
getRuleDefinition usage becomes optional
https://github.com/search?q=repo%3Amagento%2Fmagento-coding-standard%20getRuleDefinition&type=code
Hi @fooman. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
If you want a quick fix, you can separate your dev dependencies in composer using something like https://github.com/bamarni/composer-bin-plugin, it allows you to create a new namespace for each individual dev tool (phpstan, php-cs-fixer, phpcs, rector, ...) without having conflicting dependencies getting in the way.