Skip to content

Commit

Permalink
[TASK] Add a fix Composer script to run all code fixers (#759)
Browse files Browse the repository at this point in the history
This makes our life as developers a bit more convenient.

Also run Rector before the style fixer as Rector is responsible for
structural changes that need to be style-fixed after that.
  • Loading branch information
oliverklee authored Nov 4, 2024
1 parent f6feb87 commit d8154d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@
"ci:tests:coverage": "phpunit --do-not-cache-result --coverage-clover=coverage.xml",
"ci:tests:sof": "phpunit --stop-on-failure --do-not-cache-result",
"ci:tests:unit": "phpunit --do-not-cache-result",
"fix": [
"@fix:php"
],
"fix:php": [
"@fix:php:fixer",
"@fix:php:rector"
"@fix:php:rector",
"@fix:php:fixer"
],
"fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin src tests",
"fix:php:rector": "rector --config=config/rector.php",
Expand All @@ -105,6 +108,7 @@
"ci:tests:coverage": "Runs the unit tests with code coverage.",
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
"ci:tests:unit": "Runs all unit tests.",
"fix": "Runs all fixers",
"fix:php": "Autofixes all autofixable issues in the PHP code.",
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
"fix:php:rector": "Fixes autofixable issues found by Rector.",
Expand Down

0 comments on commit d8154d3

Please sign in to comment.