diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92faeb3c..fa4a5825 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,6 +155,10 @@ jobs: name: Validate composer.json run: composer validate --ansi --strict + - + name: Run ECS + run: vendor/bin/ecs check src/ spec/ + - name: Run PHPStan run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/ diff --git a/composer.json b/composer.json index dfb3bf09..a1d9ced9 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phpstan/phpstan": "0.12.84", "phpstan/phpstan-webmozart-assert": "0.12.12", "phpunit/phpunit": "^9.5", - "sylius-labs/coding-standard": "^3.2", + "sylius-labs/coding-standard": "^4.0", "symfony/browser-kit": "^4.4 || ^5.2", "symfony/debug-bundle": "^4.4 || ^5.2", "symfony/dotenv": "^4.4 || ^5.2", @@ -64,13 +64,11 @@ "Tests\\Sylius\\RefundPlugin\\Application\\": "tests/Application/src/" } }, - "conflict": { - "symplify/package-builder": "8.3.25" - }, "scripts": { "analyse": [ "@composer validate --strict", - "vendor/bin/phpstan analyse -c phpstan.neon -l max src/" + "vendor/bin/phpstan analyse -c phpstan.neon -l max src/", + "vendor/bin/ecs check src/ spec/" ], "fix": [ "vendor/bin/ecs check src/ spec/ --fix" diff --git a/easy-coding-standard.yml b/easy-coding-standard.yml deleted file mode 100644 index d1d90925..00000000 --- a/easy-coding-standard.yml +++ /dev/null @@ -1,6 +0,0 @@ -imports: - - { resource: 'vendor/sylius-labs/coding-standard/easy-coding-standard.yml' } - -parameters: - skip: - SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff.MissingVariable: ~ diff --git a/ecs.php b/ecs.php new file mode 100644 index 00000000..af3d5818 --- /dev/null +++ b/ecs.php @@ -0,0 +1,15 @@ +import('vendor/sylius-labs/coding-standard/ecs.php'); + + $containerConfigurator->parameters()->set(Option::SKIP, [ + InlineDocCommentDeclarationSniff::class . '.MissingVariable', + '**/var/*', + ]); +};