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

[FEATURE] Add composer-normalize to our development toolchain #765

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
fail-fast: false
matrix:
command:
- composer:normalize
- php:fixer
- php:stan
- php:rector
Expand Down Expand Up @@ -139,7 +140,7 @@ jobs:
- name: Install development tools
run: |
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
oliverklee marked this conversation as resolved.
Show resolved Hide resolved
- name: Run Command
run: composer ci:${{ matrix.command }}
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.44.0" installed="2.44.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.59.3" installed="3.64.0" location="./.phive/php-cs-fixer" copy="false"/>
</phive>
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@ci:static",
"@ci:dynamic"
],
"ci:composer:normalize": "\"./.phive/composer-normalize\" --dry-run",
"ci:dynamic": [
"@ci:tests"
],
Expand All @@ -74,6 +75,7 @@
"ci:php:rector": "rector --no-progress-bar --dry-run --config=config/rector.php",
"ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
"ci:static": [
"@ci:composer:normalize",
"@ci:php:fixer",
"@ci:php:lint",
"@ci:php:rector",
Expand All @@ -88,7 +90,9 @@
"fix": [
"@fix:php"
],
"fix:composer:normalize": "\"./.phive/composer-normalize\" --no-check-lock",
"fix:php": [
"@fix:composer:normalize",
"@fix:php:rector",
"@fix:php:fixer"
],
Expand All @@ -98,6 +102,7 @@
},
"scripts-descriptions": {
"ci": "Runs all dynamic and static code checks.",
"ci:composer:normalize": "Checks the formatting and structure of the composer.json.",
"ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
"ci:php:lint": "Checks the syntax of the PHP code.",
Expand All @@ -109,6 +114,7 @@
"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:composer:normalize": "Reformats and sorts the composer.json file.",
"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