Skip to content

Commit b5bb069

Browse files
authored
Merge pull request #1591 from WordPress-Coding-Standards/feature/composer-tweaks
Composer: some tweaks
2 parents 6c3a306 + 34ccaee commit b5bb069

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ before_install:
5555
- |
5656
if [[ "$SNIFF" == "1" ]]; then
5757
composer install --dev --no-suggest
58-
# The post-install-cmd script takes care of the installed_paths.
58+
# The `dev` required DealerDirect Composer plugin takes care of the installed_paths.
5959
else
6060
# The above require already does the install.
6161
$(pwd)/vendor/bin/phpcs --config-set installed_paths $(pwd)

composer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"squizlabs/php_codesniffer": "^3.3.1"
2020
},
2121
"require-dev": {
22+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
2223
"phpcompatibility/php-compatibility": "^9.0",
2324
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2425
},
@@ -27,12 +28,18 @@
2728
},
2829
"minimum-stability": "RC",
2930
"scripts": {
30-
"post-install-cmd": "@install-codestandards",
31-
"post-update-cmd": "@install-codestandards",
32-
"check-cs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs",
33-
"fix-cs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf",
34-
"install-codestandards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility",
35-
"run-tests": "@php ./vendor/phpunit/phpunit/phpunit --filter WordPress --bootstrap=\"./vendor/squizlabs/php_codesniffer/tests/bootstrap.php\" ./vendor/squizlabs/php_codesniffer/tests/AllTests.php"
31+
"check-cs": [
32+
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs"
33+
],
34+
"fix-cs": [
35+
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
36+
],
37+
"install-codestandards": [
38+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
39+
],
40+
"run-tests": [
41+
"@php ./vendor/phpunit/phpunit/phpunit --filter WordPress --bootstrap=\"./vendor/squizlabs/php_codesniffer/tests/bootstrap.php\" ./vendor/squizlabs/php_codesniffer/tests/AllTests.php"
42+
]
3643
},
3744
"support": {
3845
"issues": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues",

0 commit comments

Comments
 (0)