Skip to content

Commit 4530d56

Browse files
Kocalondrejmirtes
authored andcommitted
Drop Phing for Makefile
See phpstan/phpstan-symfony#160
1 parent e188439 commit 4530d56

File tree

10 files changed

+93
-165
lines changed

10 files changed

+93
-165
lines changed

Diff for: .gitattributes

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
*.abnf text eol=crlf
2+
*.php text eol=lf
23

3-
/tests export-ignore
4-
/doc/grammars export-ignore
5-
/build-cs export-ignore
4+
.github export-ignore
5+
build-cs export-ignore
6+
doc/grammars export-ignore
7+
tests export-ignore
8+
tmp export-ignore
9+
.editorconfig export-ignore
610
.gitattributes export-ignore
711
.gitignore export-ignore
8-
.editorconfig export-ignore
9-
.github export-ignore
10-
build.xml export-ignore
11-
phpcs.xml export-ignore
12-
build.xml export-ignore
13-
phpstan.neon export-ignore
1412
build-abnfgen.sh export-ignore
1513
CODE_OF_CONDUCT.md export-ignore
14+
Makefile export-ignore
15+
phpcs.xml export-ignore
16+
phpstan.neon export-ignore
17+
phpunit.xml export-ignore

Diff for: .gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/temp
22
/tools
3+
/tests/tmp
34
/vendor
4-
5-
/composer.lock
5+
composer.lock
6+
.phpunit.result.cache

Diff for: Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.PHONY: check
2+
check: build-abnfgen lint cs tests phpstan
3+
4+
.PHONY: tests
5+
tests:
6+
php vendor/bin/phpunit
7+
8+
.PHONY: lint
9+
lint:
10+
php vendor/bin/parallel-lint --colors \
11+
src tests \
12+
--exclude tests/PHPStan/Analyser/data \
13+
--exclude tests/PHPStan/Rules/Methods/data \
14+
--exclude tests/PHPStan/Rules/Functions/data
15+
16+
.PHONY: cs
17+
cs:
18+
composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
19+
20+
.PHONY: cs-fix
21+
cs-fix:
22+
php build-cs/vendor/bin/phpcbf
23+
24+
.PHONY: phpstan
25+
phpstan:
26+
php vendor/bin/phpstan analyse -l 5 -c phpstan.neon src tests
27+
28+
.PHONY: build-abnfgen
29+
build-abnfgen:
30+
./build-abnfgen.sh

Diff for: build.xml

-136
This file was deleted.

Diff for: composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"php": "^7.1 || ^8.0"
77
},
88
"require-dev": {
9-
"phing/phing": "^2.16.3",
109
"php-parallel-lint/php-parallel-lint": "^1.2",
1110
"phpstan/extension-installer": "^1.0",
1211
"phpstan/phpstan": "^0.12.60",

Diff for: phpcs.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0"?>
22
<ruleset name="PHPStan PHPDoc Parser">
33
<config name="php_version" value="70100"/>
4+
<arg name="colors"/>
5+
<arg name="extensions" value="php"/>
6+
<arg name="encoding" value="utf-8"/>
7+
<arg name="tab-width" value="4"/>
8+
<arg name="cache" value="tmp/cache/phpcs"/>
9+
<arg value="sp"/>
10+
<file>src</file>
11+
<file>tests</file>
412
<rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
513
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/>
614
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>

Diff for: phpunit.xml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="tests/bootstrap.php"
4+
colors="true"
5+
backupGlobals="false"
6+
backupStaticAttributes="false"
7+
beStrictAboutChangesToGlobalState="true"
8+
beStrictAboutOutputDuringTests="true"
9+
beStrictAboutTestsThatDoNotTestAnything="true"
10+
beStrictAboutTodoAnnotatedTests="true"
11+
failOnRisky="true"
12+
failOnWarning="true"
13+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
14+
>
15+
<coverage>
16+
<include>
17+
<directory suffix=".php">./src</directory>
18+
</include>
19+
<report>
20+
<clover outputFile="tests/tmp/clover.xml"/>
21+
<text
22+
outputFile="php://stdout"
23+
showUncoveredFiles="true"
24+
showOnlySummary="true"
25+
/>
26+
</report>
27+
</coverage>
28+
29+
<testsuites>
30+
<testsuite name="PHPStan PHPDoc Parser">
31+
<directory suffix="Test.php">tests</directory>
32+
</testsuite>
33+
</testsuites>
34+
35+
<logging/>
36+
</phpunit>

Diff for: tests/phpunit.xml

-17
This file was deleted.

Diff for: tmp/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!cache
3+
!.*

Diff for: tmp/cache/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.*

0 commit comments

Comments
 (0)