Skip to content

Commit e423552

Browse files
localheinzondrejmirtes
authored andcommitted
Enhancement: Run 'composer normalize' as part of the build
1 parent 66f9584 commit e423552

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

build.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
composer,
66
lint,
77
cs,
8+
composer-normalize-check,
89
tests,
910
phpstan
1011
"/>
@@ -20,6 +21,31 @@
2021
</exec>
2122
</target>
2223

24+
<target name="composer-normalize-check">
25+
<exec
26+
executable="composer"
27+
logoutput="true"
28+
passthru="true"
29+
checkreturn="true"
30+
>
31+
<arg value="normalize"/>
32+
<arg value="--ansi"/>
33+
<arg value="--dry-run"/>
34+
</exec>
35+
</target>
36+
37+
<target name="composer-normalize-fix">
38+
<exec
39+
executable="composer"
40+
logoutput="true"
41+
passthru="true"
42+
checkreturn="true"
43+
>
44+
<arg value="normalize"/>
45+
<arg value="--ansi"/>
46+
</exec>
47+
</target>
48+
2349
<target name="lint">
2450
<exec
2551
executable="vendor/bin/parallel-lint"

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"consistence/coding-standard": "^3.0.1",
1515
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
1616
"jakub-onderka/php-parallel-lint": "^1.0",
17+
"localheinz/composer-normalize": "^1.2.0",
1718
"phing/phing": "^2.16.0",
1819
"phpstan/phpstan-phpunit": "^0.12",
1920
"phpunit/phpunit": "^7.0",

0 commit comments

Comments
 (0)