diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 549385ba..3f93dac0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,9 +16,7 @@ jobs: php-version: '8.3' extensions: gd, imagick - name: php-cs-fixer - run: | - wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.4/php-cs-fixer.phar -q - php php-cs-fixer.phar fix --dry-run --diff + run: vendor/bin/php-cs-fixer fix --dry-run --diff tests: runs-on: ubuntu-22.04 diff --git a/.gitignore b/.gitignore index 201c0ad1..74c4b859 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ build vendor docs/_site -.php_cs.cache +.php-cs-fixer.cache .phpunit.result.cache composer.lock diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000..358f818d --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,14 @@ +in('src') + ->in('tests') +; + +return (new PhpCsFixer\Config()) + ->setRules([ + '@Symfony' => true, + 'phpdoc_annotation_without_dot' => false, + ]) + ->setFinder($finder) +; diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index d6c057e9..00000000 --- a/.php_cs.dist +++ /dev/null @@ -1,13 +0,0 @@ -in(['src', 'tests']) -; - -return PhpCsFixer\Config::create() - ->setRules(array( - '@Symfony' => true, - 'phpdoc_annotation_without_dot' => false, - )) - ->setFinder($finder) -; diff --git a/composer.json b/composer.json index e2f7ea59..29d60521 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,8 @@ "require-dev": { "mockery/mockery": "^1.3.3", "phpunit/phpunit": "^8.5|^9.0", - "phpunit/php-token-stream": "^3.1|^4.0" + "phpunit/php-token-stream": "^3.1|^4.0", + "friendsofphp/php-cs-fixer": "^3.48" }, "autoload": { "psr-4": {