Skip to content

Commit 89e2008

Browse files
committed
Normalize composer.json file
Reformat and normalize `composer.json`. Add `@phpunit` and `@xdebug` scripts (setting `XDEBUG_MODE=coverage`) and update test scripts to enable coverage in future PRs. Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
1 parent 65c04e7 commit 89e2008

1 file changed

Lines changed: 55 additions & 40 deletions

File tree

composer.json

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
11
{
2-
"name" : "phpcsstandards/phpcsdevtools",
3-
"description" : "Tools for PHP_CodeSniffer sniff developers.",
4-
"type" : "phpcodesniffer-standard",
5-
"keywords" : [ "phpcs", "devtools", "debug", "dev", "static analysis", "php_codesniffer", "phpcodesniffer-standard" ],
6-
"homepage": "https://phpcsstandards.github.io/PHPCSDevTools/",
7-
"license" : "LGPL-3.0-or-later",
8-
"authors" : [
2+
"name": "phpcsstandards/phpcsdevtools",
3+
"description": "Tools for PHP_CodeSniffer sniff developers.",
4+
"license": "LGPL-3.0-or-later",
5+
"type": "phpcodesniffer-standard",
6+
"keywords": [
7+
"phpcs",
8+
"devtools",
9+
"debug",
10+
"dev",
11+
"static analysis",
12+
"php_codesniffer",
13+
"phpcodesniffer-standard"
14+
],
15+
"authors": [
916
{
10-
"name" : "Juliette Reinders Folmer",
11-
"role" : "lead",
12-
"homepage" : "https://github.com/jrfnl"
17+
"name": "Juliette Reinders Folmer",
18+
"homepage": "https://github.com/jrfnl",
19+
"role": "lead"
1320
},
1421
{
15-
"name" : "Contributors",
16-
"homepage" : "https://github.com/PHPCSStandards/PHPCSDevTools/graphs/contributors"
22+
"name": "Contributors",
23+
"homepage": "https://github.com/PHPCSStandards/PHPCSDevTools/graphs/contributors"
1724
}
1825
],
19-
"support" : {
20-
"issues" : "https://github.com/PHPCSStandards/PHPCSDevTools/issues",
21-
"source" : "https://github.com/PHPCSStandards/PHPCSDevTools",
26+
"homepage": "https://phpcsstandards.github.io/PHPCSDevTools/",
27+
"support": {
28+
"issues": "https://github.com/PHPCSStandards/PHPCSDevTools/issues",
29+
"source": "https://github.com/PHPCSStandards/PHPCSDevTools",
2230
"security": "https://github.com/PHPCSStandards/PHPCSDevTools/security/policy"
2331
},
24-
"require" : {
25-
"php" : ">=5.4",
26-
"squizlabs/php_codesniffer" : "^3.1.0 || ^4.0",
27-
"dealerdirect/phpcodesniffer-composer-installer" : "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0"
32+
"require": {
33+
"php": ">=5.4",
34+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
35+
"squizlabs/php_codesniffer": "^3.1.0 || ^4.0"
2836
},
29-
"require-dev" : {
30-
"phpunit/phpunit" : "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3",
31-
"php-parallel-lint/php-parallel-lint": "^1.4.0",
37+
"require-dev": {
3238
"php-parallel-lint/php-console-highlighter": "^1.0.0",
39+
"php-parallel-lint/php-parallel-lint": "^1.4.0",
3340
"phpcsstandards/phpcsdevcs": "^1.2.0",
34-
"phpcsstandards/phpcsutils" : "^1.0",
41+
"phpcsstandards/phpcsutils": "^1.0",
42+
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3",
3543
"yoast/phpunit-polyfills": "^1.1 || ^2.0 || ^3.0"
3644
},
37-
"config": {
38-
"allow-plugins": {
39-
"dealerdirect/phpcodesniffer-composer-installer": true
40-
},
41-
"lock": false
42-
},
43-
"autoload" : {
45+
"minimum-stability": "dev",
46+
"prefer-stable": true,
47+
"autoload": {
4448
"psr-4": {
4549
"PHPCSDevTools\\Scripts\\": "Scripts/"
4650
}
4751
},
48-
"autoload-dev" : {
52+
"autoload-dev": {
4953
"psr-4": {
5054
"PHPCSDevTools\\Tests\\": "Tests/"
5155
}
5256
},
5357
"bin": [
5458
"bin/phpcs-check-feature-completeness"
5559
],
56-
"minimum-stability": "dev",
57-
"prefer-stable": true,
58-
"scripts" : {
60+
"config": {
61+
"allow-plugins": {
62+
"dealerdirect/phpcodesniffer-composer-installer": true
63+
},
64+
"lock": false
65+
},
66+
"scripts": {
5967
"lint": [
6068
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git"
6169
],
@@ -69,25 +77,32 @@
6977
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
7078
],
7179
"test": [
72-
"@php ./vendor/phpunit/phpunit/phpunit"
80+
"@phpunit"
7381
],
7482
"test-sniff": [
75-
"@php ./vendor/phpunit/phpunit/phpunit --testsuite DebugSniff"
83+
"@phpunit --testsuite DebugSniff"
7684
],
7785
"test-tools": [
78-
"@php ./vendor/phpunit/phpunit/phpunit --testsuite DevTools"
86+
"@phpunit --testsuite DevTools"
7987
],
8088
"test-lte9": [
81-
"@php ./vendor/phpunit/phpunit/phpunit -c phpunitlte9.xml.dist"
89+
"@phpunit -c phpunitlte9.xml.dist"
8290
],
8391
"test-sniff-lte9": [
84-
"@php ./vendor/phpunit/phpunit/phpunit -c phpunitlte9.xml.dist --testsuite DebugSniff"
92+
"@phpunit -c phpunitlte9.xml.dist --testsuite DebugSniff"
8593
],
8694
"test-tools-lte9": [
87-
"@php ./vendor/phpunit/phpunit/phpunit -c phpunitlte9.xml.dist --testsuite DevTools"
95+
"@phpunit -c phpunitlte9.xml.dist --testsuite DevTools"
8896
],
8997
"check-complete": [
9098
"@php ./bin/phpcs-check-feature-completeness ./PHPCSDebug"
99+
],
100+
"phpunit": [
101+
"@xdebug",
102+
"@php ./vendor/phpunit/phpunit/phpunit"
103+
],
104+
"xdebug": [
105+
"@putenv XDEBUG_MODE=coverage"
91106
]
92107
}
93108
}

0 commit comments

Comments
 (0)