diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 46c68e4..3572ffa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -85,9 +85,6 @@ jobs: - name: PHPUnit configuration file run: xmllint --schema vendor/phpunit/phpunit/phpunit.xsd --noout phpunit.xml.dist - - name: PHPCodeSniffer configuration file - run: xmllint --schema vendor/squizlabs/php_codesniffer/phpcs.xsd --noout phpcs.xml.dist - - name: Fetch schema for xliff run: wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd --output-document=.Build/xliff-core-1.2-strict.xsd @@ -121,7 +118,7 @@ jobs: run: composer install --prefer-dist --no-progress --no-suggest - name: Coding Guideline - run: ./vendor/bin/phpcs + run: ./vendor/bin/ecs tests: runs-on: ubuntu-latest diff --git a/Tests/Unit/Domain/Model/NullDataFactoryTest.php b/Tests/Unit/Domain/Model/NullDataFactoryTest.php index 7e4ea07..e50aac7 100644 --- a/Tests/Unit/Domain/Model/NullDataFactoryTest.php +++ b/Tests/Unit/Domain/Model/NullDataFactoryTest.php @@ -21,10 +21,10 @@ namespace WerkraumMedia\Calendar\Tests\Unit\Domain\Model; * 02110-1301, USA. */ +use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use WerkraumMedia\Calendar\Domain\Model\Day; use WerkraumMedia\Calendar\Domain\Model\NullDataFactory; -use PHPUnit\Framework\TestCase; /** * @covers WerkraumMedia\Calendar\Domain\Model\NullDataFactory diff --git a/composer.json b/composer.json index f9ab537..13eaaee 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "maglnet/composer-require-checker": "^2.1", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5" + "symplify/easy-coding-standard": "^9.2" }, "extra": { "typo3/cms": { diff --git a/ecs.php b/ecs.php new file mode 100644 index 0000000..379a801 --- /dev/null +++ b/ecs.php @@ -0,0 +1,35 @@ +parameters(); + $parameters->set(Option::PATHS, [ + __DIR__ . '/Classes', + __DIR__ . '/Tests', + __DIR__ . '/ext_emconf.php', + __DIR__ . '/ecs.php', + ]); + + $parameters->set(Option::SETS, [ + // run and fix, one by one + // SetList::SPACES, + // SetList::ARRAY, + // SetList::DOCBLOCK, + // SetList::NAMESPACES, + // SetList::CONTROL_STRUCTURES, + // SetList::CLEAN_CODE, + SetList::PSR_12, + ]); + + $services = $containerConfigurator->services(); + $services->set(ArraySyntaxFixer::class) + ->call('configure', [[ + 'syntax' => 'short', + ]]); +}; diff --git a/phpcs.xml.dist b/phpcs.xml.dist deleted file mode 100644 index 68b095a..0000000 --- a/phpcs.xml.dist +++ /dev/null @@ -1,19 +0,0 @@ - - - This project coding standard - - Classes/ - Tests/ - - - - - - - - - - - /Tests/* - -