easy-coding-standard.php config not compatible with latest package syntax
sta1r opened this issue · 1 comments
sta1r commented
PHP Version
8.1
Shopware Version
6.4.11.1
Expected behaviour
[OK] No errors found. Great job - your code is shiny in style!
Actual behaviour
[ERROR] Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::__
construct(): Argument #1 ($container) must be of type
Symfony\Component\DependencyInjection\ContainerBuilder,
ECSPrefix202210\Symfony\Component\DependencyInjection\ContainerBuilder given,
called in ...Sites/shopware/development/vendor/symplify/easy-coding-standard/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php on line 67
How to reproduce
cd development
composer require --dev symplify/easy-coding-standard
vendor/bin/ecs check custom/plugins/my-plugin/src
I'm assuming of course that easy-coding-standard.php is supposed to be used with symplify/easy-coding-standard
. If so, firstly the file needs to be called ecs.php. And secondly we have the error above because the config file does not follow the newest syntax presented here: https://github.com/symplify/easy-coding-standard#usage
Please note that by reverting to 9.3.x of symplify/easy-coding-standard
, the test works as expected.
sta1r commented
Ah - there's a newer config file here: https://github.com/shopware/platform/blob/trunk/ecs.php which is no doubt what we should be using. Remove /easy-coding-standard.php?