Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Add a fix Composer script to run all code fixers #759

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Comment on lines +92 to +93
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F comes before R in the latin alphabet, so the existing ordering was correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this on purpose:

Also run Rector before the style fixer as Rector is responsible for structural changes that need to be style-fixed after that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this on purpose:

Also run Rector before the style fixer as Rector is responsible for structural changes that need to be style-fixed after that.

Sorry, I missed that, and for some reason thought the script content itself would be reordered by Composer-Normalize :/

],
"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
Loading