Skip to content

Commit 5df53c2

Browse files
committed
[BUGFIX] Remove invalid tool call from composer check script
With commit [1] development dependencies have been removed from the `composer.json`, but not from the `composer.lock`. This indicates a inproper use of `composer` and should be taken care in review of pull-requests. A good practice here is to etablish a rule that composer commands needs to be added to the commit message and the pull-request. Other removed dependency and downgraded dependencies have been fixed or readded meanwhile, still missing the `phpcs` tool for the `check composer script`. The `CONTRIBUTION.md` states to execute `composer check` before creating a pull-request, which is literally broken due to the missing dependency. This change removes the php sniffer call from the check script. Additionally, the composer scripts are enhanced to use the same php binary used to invoke composer itself to mitigate issues using the wrong php version on systems with multiple php version binaries. Further consideration should be to use the check command in the Github Action workflow to have a border if development toolchain is gonna be broken with a change. [1] c3e34a0
1 parent 43785fe commit 5df53c2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

composer.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,19 @@
3636
],
3737
"scripts": {
3838
"test": [
39-
"phpunit --color=always"
39+
"@php vendor/bin/phpunit --color=always"
4040
],
4141
"test-no-coverage": [
42-
"phpunit --color=always --no-coverage"
42+
"@php vendor/bin/phpunit --color=always --no-coverage"
4343
],
4444
"check": [
45-
"php-cs-fixer fix --ansi --dry-run --diff",
46-
"phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --ignore=src/PhpWord/Shared/PCLZip --standard=PSR2 -n",
47-
"phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php",
45+
"@php vendor/bin/php-cs-fixer fix --ansi --dry-run --diff",
46+
"@php vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php",
4847
"@test-no-coverage",
49-
"phpstan analyse --ansi"
48+
"@php vendor/bin/phpstan analyse --ansi"
5049
],
5150
"fix": [
52-
"php-cs-fixer fix --ansi"
51+
"@php vendor/bin/php-cs-fixer fix --ansi"
5352
]
5453
},
5554
"scripts-descriptions": {

0 commit comments

Comments
 (0)