Skip to content

Commit 0c45da7

Browse files
committed
Phing removal
1 parent 4683345 commit 0c45da7

File tree

7 files changed

+50
-223
lines changed

7 files changed

+50
-223
lines changed

.github/workflows/build.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: php bin/transform-source.php
4747

4848
- name: "Lint"
49-
run: "vendor/bin/phing lint"
49+
run: "make lint"
5050

5151
coding-standards:
5252
name: "Coding Standard"
@@ -75,7 +75,7 @@ jobs:
7575
run: "composer install --no-interaction --no-progress --no-suggest"
7676

7777
- name: "Lint"
78-
run: "vendor/bin/phing lint"
78+
run: "make lint"
7979

8080
- name: "Coding Standard"
8181
run: "make cs"
@@ -88,7 +88,7 @@ jobs:
8888
strategy:
8989
matrix:
9090
php-version:
91-
- "7.4"
91+
- "8.0"
9292

9393
steps:
9494
- name: "Checkout"
@@ -104,7 +104,7 @@ jobs:
104104
run: "composer install --no-interaction --no-progress --no-suggest"
105105

106106
- name: "Composer Require Checker"
107-
run: "vendor/bin/phing composer-require-checker"
107+
run: "make composer-require-checker"
108108

109109
tests:
110110
name: "Tests"
@@ -235,7 +235,7 @@ jobs:
235235
script:
236236
- "make phpstan"
237237
- "make phpstan-static-reflection"
238-
- "vendor/bin/phing phpstan-validate-stub-files"
238+
- "make phpstan-validate-stub-files"
239239

240240
steps:
241241
- name: "Checkout"
@@ -294,12 +294,12 @@ jobs:
294294

295295
- name: "PHPStan with result cache"
296296
run: |
297-
vendor/bin/phing phpstan-result-cache
297+
make phpstan-result-cache
298298
bin/phpstan clear-result-cache -c build/phpstan.neon
299-
vendor/bin/phing phpstan-result-cache
299+
make phpstan-result-cache
300300
echo -e "\n\n" >> src/TrinaryLogic.php
301-
vendor/bin/phing phpstan-result-cache
302-
vendor/bin/phing phpstan-result-cache
301+
make phpstan-result-cache
302+
make phpstan-result-cache
303303
304304
- name: "Upload result cache artifact"
305305
uses: actions/upload-artifact@v2
@@ -393,7 +393,7 @@ jobs:
393393
- name: "Generate baseline"
394394
run: |
395395
cp phpstan-baseline.neon phpstan-baseline-orig.neon && \
396-
vendor/bin/phing phpstan-generate-baseline && \
396+
make phpstan-generate-baseline && \
397397
diff phpstan-baseline.neon phpstan-baseline-orig.neon
398398
399399
e2e-tests:

Makefile

+38
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,29 @@ tests-integration-coverage:
2020
tests-static-reflection-coverage:
2121
php vendor/bin/paratest --bootstrap tests/bootstrap-static-reflection.php
2222

23+
lint:
24+
php vendor/bin/parallel-lint --colors \
25+
--exclude tests/PHPStan/Analyser/data \
26+
--exclude tests/PHPStan/Rules/Methods/data \
27+
--exclude tests/PHPStan/Rules/Functions/data \
28+
--exclude tests/PHPStan/Rules/Operators/data/invalid-inc-dec.php \
29+
--exclude tests/PHPStan/Rules/Arrays/data/offset-access-without-dim-for-reading.php \
30+
--exclude tests/PHPStan/Rules/Classes/data/duplicate-declarations.php \
31+
--exclude tests/PHPStan/Rules/Classes/data/extends-error.php \
32+
--exclude tests/PHPStan/Rules/Classes/data/implements-error.php \
33+
--exclude tests/PHPStan/Rules/Classes/data/interface-extends-error.php \
34+
--exclude tests/PHPStan/Rules/Classes/data/trait-use-error.php \
35+
--exclude tests/PHPStan/Rules/Properties/data/default-value-for-native-property-type.php \
36+
--exclude tests/PHPStan/Rules/Arrays/data/empty-array-item.php \
37+
--exclude tests/PHPStan/Rules/Classes/data/invalid-promoted-properties.php \
38+
--exclude tests/PHPStan/Rules/Classes/data/duplicate-promoted-property.php \
39+
--exclude tests/PHPStan/Rules/Properties/data/default-value-for-promoted-property.php \
40+
--exclude tests/PHPStan/Rules/Operators/data/invalid-assign-var.php \
41+
--exclude tests/PHPStan/Rules/Functions/data/arrow-function-nullsafe-by-ref.php \
42+
--exclude tests/PHPStan/Levels/data/namedArguments.php \
43+
--exclude tests/PHPStan/Rules/Keywords/data/continue-break.php \
44+
src tests compiler/src
45+
2346
cs:
2447
composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
2548

@@ -31,3 +54,18 @@ phpstan:
3154

3255
phpstan-static-reflection:
3356
php bin/phpstan clear-result-cache -q && php -d memory_limit=768M bin/phpstan analyse -c phpstan-static-reflection.neon
57+
58+
phpstan-result-cache:
59+
php -d memory_limit=768M bin/phpstan analyse -c phpstan-static-reflection.neon
60+
61+
phpstan-generate-baseline:
62+
php -d memory_limit=768M bin/phpstan --generate-baseline
63+
64+
phpstan-validate-stub-files:
65+
php bin/phpstan analyse -c conf/config.stubFiles.neon -l 8 tests/notAutoloaded/empty.php
66+
67+
phpstan-pro:
68+
php -d memory_limit=768M bin/phpstan --pro
69+
70+
composer-require-checker:
71+
php build/composer-require-checker.phar check --config-file $(CURDIR)/build/composer-require-checker.json

build.xml

+1-113
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<project name="PHPStan" default="check">
3-
<property name="path.composer-require-checker"
4-
value="tmp/composer-require-checker-2.1.0.phar"/>
5-
<property name="url.composer-require-checker"
6-
value="https://github.com/maglnet/ComposerRequireChecker/releases/download/2.1.0/composer-require-checker.phar"/>
7-
<property name="phpstan.config" value="phpstan.neon"/>
8-
9-
<target name="composer-require-checker">
10-
<if>
11-
<and>
12-
<not>
13-
<available file="${path.composer-require-checker}"/>
14-
</not>
15-
<not><os family="windows"/></not>
16-
</and>
17-
<then>
18-
<exec
19-
executable="wget"
20-
logoutput="true"
21-
passthru="true"
22-
checkreturn="true"
23-
>
24-
<arg value="-O"/>
25-
<arg path="${path.composer-require-checker}"/>
26-
<arg value="${url.composer-require-checker}"/>
27-
</exec>
28-
</then>
29-
</if>
30-
<if>
31-
<available file="${path.composer-require-checker}"/>
32-
<then>
33-
<exec
34-
executable="php"
35-
logoutput="true"
36-
passthru="true"
37-
checkreturn="true"
38-
>
39-
<arg path="${path.composer-require-checker}"/>
40-
<arg value="check"/>
41-
<arg value="--config-file"/>
42-
<arg path="${project.basedir}/build/composer-require-checker.json"/>
43-
<arg path="composer.json"/>
44-
</exec>
45-
</then>
46-
</if>
47-
</target>
48-
2+
<project name="PHPStan">
493
<target name="lint">
504
<exec
515
executable="vendor/bin/parallel-lint"
@@ -98,70 +52,4 @@
9852
</exec>
9953
</target>
10054

101-
<target name="phpstan-result-cache">
102-
<delete file="${phpstan.config}"/>
103-
<exec
104-
executable="php"
105-
logoutput="true"
106-
passthru="true"
107-
checkreturn="true"
108-
>
109-
<arg value="-d"/>
110-
<arg value="memory_limit=768M"/>
111-
<arg path="bin/phpstan"/>
112-
</exec>
113-
</target>
114-
115-
<target name="phpstan-validate-stub-files">
116-
<touch file="empty.php"/>
117-
<exec
118-
executable="php"
119-
logoutput="true"
120-
passthru="true"
121-
checkreturn="true"
122-
>
123-
<arg value="-d"/>
124-
<arg value="memory_limit=768M"/>
125-
<arg path="bin/phpstan"/>
126-
<arg value="analyse"/>
127-
<arg value="-c"/>
128-
<arg path="conf/config.stubFiles.neon"/>
129-
<arg value="-l"/>
130-
<arg value="8"/>
131-
<arg path="empty.php"/>
132-
</exec>
133-
<delete file="empty.php"/>
134-
</target>
135-
136-
<target name="phpstan-pro">
137-
<delete file="${phpstan.config}"/>
138-
<exec
139-
executable="php"
140-
logoutput="true"
141-
passthru="true"
142-
checkreturn="true"
143-
>
144-
<arg value="-d"/>
145-
<arg value="memory_limit=1024M"/>
146-
<arg path="bin/phpstan"/>
147-
<arg value="--pro"/>
148-
</exec>
149-
</target>
150-
151-
<target name="phpstan-generate-baseline">
152-
<delete file="${phpstan.config}"/>
153-
<exec
154-
executable="php"
155-
logoutput="true"
156-
passthru="true"
157-
checkreturn="true"
158-
>
159-
<arg value="-d"/>
160-
<arg value="memory_limit=768M"/>
161-
<arg path="bin/phpstan"/>
162-
<arg value="--generate-baseline"/>
163-
<arg value="-vvv"/>
164-
</exec>
165-
</target>
166-
16755
</project>

build/composer-require-checker.phar

597 KB
Binary file not shown.

composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"require-dev": {
4343
"brianium/paratest": "^6.2.0",
4444
"nategood/httpful": "^0.2.20",
45-
"phing/phing": "^2.16.0",
4645
"php-parallel-lint/php-parallel-lint": "^1.2.0",
4746
"phpstan/phpstan-deprecation-rules": "^0.12.3",
4847
"phpstan/phpstan-php-parser": "^0.12",

composer.lock

+1-99
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/notAutoloaded/empty.php

Whitespace-only changes.

0 commit comments

Comments
 (0)