From f2fe682935872241248df6d557edc3b2fada26aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Tue, 22 Aug 2023 09:19:48 +0200 Subject: [PATCH] Use shim package for PHP CS Fixer --- .gitignore | 1 + composer.json | 12 +++++++----- psalm.xml | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5e55148..48451c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/var/ /vendor/ /composer.lock /.php-cs-fixer.cache diff --git a/composer.json b/composer.json index a3b5dc2..4a8431c 100644 --- a/composer.json +++ b/composer.json @@ -5,12 +5,12 @@ "type": "library", "require": { "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "^3.22", - "kubawerlos/php-cs-fixer-custom-fixers": "^3.16.2" + "kubawerlos/php-cs-fixer-custom-fixers": "^3.16.2", + "php-cs-fixer/shim": "^3.22" }, "require-dev": { - "phpunit/phpunit": "^9.6.10", - "vimeo/psalm": "^5.14.1" + "phpunit/phpunit": "^9.6.11", + "vimeo/psalm": "^5.15.0" }, "autoload": { "psr-4": { @@ -28,8 +28,10 @@ ], "verify": [ "php-cs-fixer fix -vvv --diff --dry-run", + "mkdir -p ./var", + "@composer require friendsofphp/php-cs-fixer --no-interaction --working-dir=./var", "psalm --no-progress --shepherd", - "phpunit --no-configuration ./tests" + "phpunit --bootstrap=./var/vendor/autoload.php --no-configuration ./tests" ] } } diff --git a/psalm.xml b/psalm.xml index c043841..cb48cdf 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,6 +6,7 @@ xsi:schemaLocation='https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd' findUnusedBaselineEntry='true' findUnusedCode='false' + autoloader='./var/vendor/autoload.php' >