Skip to content

Commit 0da855f

Browse files
committed
[FEATURE] Add composer-normalize to our development toolchain
1 parent 23f4061 commit 0da855f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
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

.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: 5 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",
@@ -89,6 +91,7 @@
8991
"@fix:php"
9092
],
9193
"fix:php": [
94+
"@fix:composer:normalize",
9295
"@fix:php:rector",
9396
"@fix:php:fixer"
9497
],
@@ -98,6 +101,7 @@
98101
},
99102
"scripts-descriptions": {
100103
"ci": "Runs all dynamic and static code checks.",
104+
"ci:composer:normalize": "Checks the formatting and structure of the composer.json.",
101105
"ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
102106
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
103107
"ci:php:lint": "Checks the syntax of the PHP code.",
@@ -109,6 +113,7 @@
109113
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
110114
"ci:tests:unit": "Runs all unit tests.",
111115
"fix": "Runs all fixers",
116+
"fix:composer:normalize": "Reformats and sorts the composer.json file.",
112117
"fix:php": "Autofixes all autofixable issues in the PHP code.",
113118
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
114119
"fix:php:rector": "Fixes autofixable issues found by Rector.",

0 commit comments

Comments
 (0)