Skip to content

Commit d9e38af

Browse files
committedOct 13, 2022
Encapsulate php and composer calls in composer.json for better portability
1 parent f14a095 commit d9e38af

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎composer.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,35 @@
6363
},
6464
"scripts": {
6565
"post-install-cmd": [
66-
"composer install --working-dir=tools/php-cs-fixer --no-progress --no-interaction",
67-
"composer install --working-dir=tools/phpstan --no-progress --no-interaction"
66+
"@composer install --working-dir=tools/php-cs-fixer --no-progress --no-interaction",
67+
"@composer install --working-dir=tools/phpstan --no-progress --no-interaction"
6868
],
6969
"post-update-cmd": [
70-
"composer update --working-dir=tools/php-cs-fixer --no-progress --no-interaction",
71-
"composer update --working-dir=tools/phpstan --no-progress --no-interaction"
70+
"@composer update --working-dir=tools/php-cs-fixer --no-progress --no-interaction",
71+
"@composer update --working-dir=tools/phpstan --no-progress --no-interaction"
7272
],
7373
"all": [
7474
"@lint",
7575
"@analyze",
7676
"@test"
7777
],
7878
"analyze": [
79-
"tools/phpstan/vendor/bin/phpstan analyze -c phpstan.neon --ansi",
80-
"tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run -vvv --ansi",
81-
"vendor/bin/phpcs --standard=PSR2 --ignore=*.js ./lib/ ./tests/"
79+
"@php tools/phpstan/vendor/bin/phpstan analyze -c phpstan.neon --ansi",
80+
"@php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run -vvv --ansi",
81+
"@php vendor/bin/phpcs --standard=PSR2 --ignore=*.js ./lib/ ./tests/"
8282
],
8383
"fix": [
8484
"@composer normalize",
85-
"tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff -vvv || exit 0",
86-
"vendor/bin/phpcbf --standard=PSR2 --ignore=*.js ./lib/ ./tests/"
85+
"@php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff -vvv || exit 0",
86+
"@php vendor/bin/phpcbf --standard=PSR2 --ignore=*.js ./lib/ ./tests/"
8787
],
8888
"lint": [
89-
"vendor/bin/parallel-lint -j 10 ./lib ./tests example.php",
89+
"@php vendor/bin/parallel-lint -j 10 ./lib ./tests example.php",
9090
"@composer validate",
9191
"@composer normalize --dry-run"
9292
],
9393
"test": [
94-
"vendor/bin/phpunit --colors=always"
94+
"@php vendor/bin/phpunit --colors=always"
9595
]
9696
}
9797
}

0 commit comments

Comments
 (0)