Skip to content

Commit 08f56a1

Browse files
authored
[FEATURE] Add composer-normalize to our development toolchain (#765)
1 parent 3ef8030 commit 08f56a1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
fail-fast: false
104104
matrix:
105105
command:
106+
- composer:normalize
106107
- php:fixer
107108
- php:stan
108109
- php:rector
@@ -139,7 +140,7 @@ jobs:
139140
140141
- name: Install development tools
141142
run: |
142-
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
143+
phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
143144
144145
- name: Run Command
145146
run: composer ci:${{ matrix.command }}

.phive/phars.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3+
<phar name="composer-normalize" version="^2.44.0" installed="2.44.0" location="./.phive/composer-normalize" copy="false"/>
34
<phar name="php-cs-fixer" version="^3.59.3" installed="3.64.0" location="./.phive/php-cs-fixer" copy="false"/>
45
</phive>

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@ci:static",
6767
"@ci:dynamic"
6868
],
69+
"ci:composer:normalize": "\"./.phive/composer-normalize\" --dry-run",
6970
"ci:dynamic": [
7071
"@ci:tests"
7172
],
@@ -74,6 +75,7 @@
7475
"ci:php:rector": "rector --no-progress-bar --dry-run --config=config/rector.php",
7576
"ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
7677
"ci:static": [
78+
"@ci:composer:normalize",
7779
"@ci:php:fixer",
7880
"@ci:php:lint",
7981
"@ci:php:rector",
@@ -88,7 +90,9 @@
8890
"fix": [
8991
"@fix:php"
9092
],
93+
"fix:composer:normalize": "\"./.phive/composer-normalize\" --no-check-lock",
9194
"fix:php": [
95+
"@fix:composer:normalize",
9296
"@fix:php:rector",
9397
"@fix:php:fixer"
9498
],
@@ -98,6 +102,7 @@
98102
},
99103
"scripts-descriptions": {
100104
"ci": "Runs all dynamic and static code checks.",
105+
"ci:composer:normalize": "Checks the formatting and structure of the composer.json.",
101106
"ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
102107
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
103108
"ci:php:lint": "Checks the syntax of the PHP code.",
@@ -109,6 +114,7 @@
109114
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
110115
"ci:tests:unit": "Runs all unit tests.",
111116
"fix": "Runs all fixers",
117+
"fix:composer:normalize": "Reformats and sorts the composer.json file.",
112118
"fix:php": "Autofixes all autofixable issues in the PHP code.",
113119
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
114120
"fix:php:rector": "Fixes autofixable issues found by Rector.",

0 commit comments

Comments
 (0)