Skip to content

Commit 9a924d5

Browse files
authored
Use shim package for PHP CS Fixer (#11)
1 parent a31d7fd commit 9a924d5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/var/
12
/vendor/
23
/composer.lock
34
/.php-cs-fixer.cache

composer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"type": "library",
66
"require": {
77
"php": "^7.4 || ^8.0",
8-
"friendsofphp/php-cs-fixer": "^3.22",
9-
"kubawerlos/php-cs-fixer-custom-fixers": "^3.16.2"
8+
"kubawerlos/php-cs-fixer-custom-fixers": "^3.16.2",
9+
"php-cs-fixer/shim": "^3.22"
1010
},
1111
"require-dev": {
12-
"phpunit/phpunit": "^9.6.10",
13-
"vimeo/psalm": "^5.14.1"
12+
"phpunit/phpunit": "^9.6.11",
13+
"vimeo/psalm": "^5.15.0"
1414
},
1515
"autoload": {
1616
"psr-4": {
@@ -28,8 +28,10 @@
2828
],
2929
"verify": [
3030
"php-cs-fixer fix -vvv --diff --dry-run",
31+
"mkdir -p ./var",
32+
"@composer require friendsofphp/php-cs-fixer --no-interaction --working-dir=./var",
3133
"psalm --no-progress --shepherd",
32-
"phpunit --no-configuration ./tests"
34+
"phpunit --bootstrap=./var/vendor/autoload.php --no-configuration ./tests"
3335
]
3436
}
3537
}

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
xsi:schemaLocation='https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd'
77
findUnusedBaselineEntry='true'
88
findUnusedCode='false'
9+
autoloader='./var/vendor/autoload.php'
910
>
1011
<projectFiles>
1112
<directory name='./src' />

0 commit comments

Comments
 (0)