Skip to content

Commit 9827fe4

Browse files
committed
Update README
1 parent b474d60 commit 9827fe4

File tree

5 files changed

+18
-76
lines changed

5 files changed

+18
-76
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ jobs:
233233
- "8.0"
234234
operating-system: [ubuntu-latest, windows-latest]
235235
script:
236-
- "vendor/bin/phing phpstan"
237-
- "vendor/bin/phing phpstan-static-reflection"
236+
- "make phpstan"
237+
- "make phpstan-static-reflection"
238238
- "vendor/bin/phing phpstan-validate-stub-files"
239239

240240
steps:

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.PHONY: tests
22

3+
build: cs tests phpstan
4+
35
tests:
46
php vendor/bin/paratest --no-coverage
57

@@ -23,3 +25,9 @@ cs:
2325

2426
cs-fix:
2527
php build-cs/vendor/bin/phpcbf
28+
29+
phpstan:
30+
php bin/phpstan clear-result-cache -q && php -d memory_limit=768M bin/phpstan
31+
32+
phpstan-static-reflection:
33+
php bin/phpstan clear-result-cache -q && php -d memory_limit=768M bin/phpstan analyse -c phpstan-static-reflection.neon

README.md

+5-11
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,38 @@ Initially you need to run `composer install`, or `composer update` in case you a
2121
Afterwards you can either run the whole build including linting and coding standards using
2222

2323
```bash
24-
vendor/bin/phing
24+
make
2525
```
2626

2727
### Running development version
2828

2929
You can also choose to run only part of the build. To analyse PHPStan by PHPStan itself, run:
3030

3131
```bash
32-
vendor/bin/phing phpstan
32+
make phpstan
3333
```
3434

3535
### Fixing code style
3636

3737
To detect code style issues, run:
3838

3939
```bash
40-
vendor/bin/phing cs
40+
make cs
4141
```
4242

4343
This requires PHP 7.4. On older versions the build target will be skipped and succeed silently.
4444

4545
And then to fix code style, run:
4646

4747
```bash
48-
vendor/bin/phing cs-fix
48+
make cs-fix
4949
```
5050

5151
### Running tests
5252

5353
Run:
5454
```bash
55-
vendor/bin/phing tests
56-
```
57-
58-
You can find most issues by running `tests-fast` only which is recommended during development:
59-
60-
```bash
61-
vendor/bin/phing tests-fast
55+
make tests
6256
```
6357

6458
### Debugging

build.xml

-63
Original file line numberDiff line numberDiff line change
@@ -98,69 +98,6 @@
9898
</exec>
9999
</target>
100100

101-
<target name="phpstan">
102-
<delete file="${phpstan.config}"/>
103-
<exec
104-
executable="php"
105-
logoutput="true"
106-
passthru="true"
107-
checkreturn="true"
108-
>
109-
<arg path="bin/phpstan"/>
110-
<arg value="clear-result-cache"/>
111-
<arg value="-q"/>
112-
</exec>
113-
<exec
114-
executable="php"
115-
logoutput="true"
116-
passthru="true"
117-
checkreturn="true"
118-
>
119-
<arg value="-d"/>
120-
<arg value="memory_limit=768M"/>
121-
<arg path="bin/phpstan"/>
122-
</exec>
123-
</target>
124-
125-
<target name="phpstan-static-reflection">
126-
<touch file="${phpstan.config}"/>
127-
<append
128-
destFile="${phpstan.config}"
129-
text="includes: [ build/phpstan.neon"
130-
append="false"
131-
></append>
132-
<append
133-
destFile="${phpstan.config}"
134-
text=", conf/staticReflection.neon"
135-
></append>
136-
<append
137-
destFile="${phpstan.config}"
138-
text=" ]"
139-
></append>
140-
<exec
141-
executable="php"
142-
logoutput="true"
143-
passthru="true"
144-
checkreturn="true"
145-
>
146-
<arg path="bin/phpstan"/>
147-
<arg value="clear-result-cache"/>
148-
<arg value="-c"/>
149-
<arg path="${phpstan.config}"/>
150-
<arg value="-q"/>
151-
</exec>
152-
<exec
153-
executable="php"
154-
logoutput="true"
155-
passthru="true"
156-
checkreturn="true"
157-
>
158-
<arg value="-d"/>
159-
<arg value="memory_limit=768M"/>
160-
<arg path="bin/phpstan"/>
161-
</exec>
162-
</target>
163-
164101
<target name="phpstan-result-cache">
165102
<delete file="${phpstan.config}"/>
166103
<exec

phpstan-static-reflection.neon

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
includes:
2+
- build/phpstan.neon
3+
- conf/staticReflection.neon

0 commit comments

Comments
 (0)