Skip to content

Commit 1d685af

Browse files
localheinzondrejmirtes
authored andcommitted
Enhancement: Run 'composer validate' and 'composer normalize' as part of build
1 parent e932fb5 commit 1d685af

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

build.xml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@
22
<project name="PHPStan deprecation rules" default="check">
33

44
<target name="check" depends="
5-
composer,
5+
composer-validate,
6+
composer-install,
67
lint,
78
cs,
9+
composer-normalize-check,
810
tests,
911
phpstan
1012
"/>
1113

12-
<target name="composer">
14+
<target name="composer-validate">
15+
<exec
16+
executable="composer"
17+
logoutput="true"
18+
passthru="true"
19+
checkreturn="true"
20+
>
21+
<arg value="validate"/>
22+
<arg value="--ansi"/>
23+
</exec>
24+
</target>
25+
26+
<target name="composer-install">
1327
<exec
1428
executable="composer"
1529
logoutput="true"
@@ -20,6 +34,31 @@
2034
</exec>
2135
</target>
2236

37+
<target name="composer-normalize-check">
38+
<exec
39+
executable="composer"
40+
logoutput="true"
41+
passthru="true"
42+
checkreturn="true"
43+
>
44+
<arg value="normalize"/>
45+
<arg value="--ansi"/>
46+
<arg value="--dry-run"/>
47+
</exec>
48+
</target>
49+
50+
<target name="composer-normalize-fix">
51+
<exec
52+
executable="composer"
53+
logoutput="true"
54+
passthru="true"
55+
checkreturn="true"
56+
>
57+
<arg value="normalize"/>
58+
<arg value="--ansi"/>
59+
</exec>
60+
</target>
61+
2362
<target name="lint">
2463
<exec
2564
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.3.0",
1718
"phing/phing": "^2.16.0",
1819
"phpstan/phpstan-phpunit": "^0.12",
1920
"phpunit/phpunit": "^7.0",

0 commit comments

Comments
 (0)