Skip to content

Commit 35ebd20

Browse files
committed
Drop Phing for Makefile
See phpstan/phpstan-symfony#160
1 parent 65eb110 commit 35ebd20

File tree

11 files changed

+153
-205
lines changed

11 files changed

+153
-205
lines changed

.gitattributes

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
/tests export-ignore
1+
*.php text eol=lf
2+
3+
.github export-ignore
4+
tests export-ignore
5+
tmp export-ignore
6+
.gitattributes export-ignore
7+
.gitignore export-ignore
8+
Makefile export-ignore
9+
phpcs.xml export-ignore
10+
phpstan.neon export-ignore
11+
phpunit.xml export-ignore

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545

4646
- name: "Lint"
47-
run: "vendor/bin/phing lint"
47+
run: "make lint"
4848

4949
coding-standards:
5050
name: "Coding Standard"
@@ -68,10 +68,10 @@ jobs:
6868
run: "composer install --no-interaction --no-progress --no-suggest"
6969

7070
- name: "Lint"
71-
run: "vendor/bin/phing lint"
71+
run: "make lint"
7272

7373
- name: "Coding Standard"
74-
run: "vendor/bin/phing cs"
74+
run: "make cs"
7575

7676
tests:
7777
name: "Tests"
@@ -113,7 +113,7 @@ jobs:
113113
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
114114

115115
- name: "Tests"
116-
run: "vendor/bin/phing tests"
116+
run: "make tests"
117117

118118
static-analysis:
119119
name: "PHPStan"
@@ -157,4 +157,4 @@ jobs:
157157
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
158158

159159
- name: "PHPStan"
160-
run: "vendor/bin/phing phpstan"
160+
run: "make phpstan"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
/composer.lock
1+
/tests/tmp
22
/vendor
3+
composer.lock
4+
.phpunit.result.cache

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY: check
2+
check: 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+
13+
.PHONY: cs
14+
cs:
15+
composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
16+
17+
.PHONY: cs-fix
18+
cs-fix:
19+
php build-cs/vendor/bin/phpcbf
20+
21+
.PHONY: phpstan
22+
phpstan:
23+
php vendor/bin/phpstan analyse -l 8 -c phpstan.neon src tests

build.xml

Lines changed: 0 additions & 110 deletions
This file was deleted.

composer.json

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,63 @@
11
{
2-
"name": "phpstan/phpstan-doctrine",
3-
"type": "phpstan-extension",
4-
"description": "Doctrine extensions for PHPStan",
5-
"license": [
6-
"MIT"
7-
],
8-
"require": {
9-
"php": "^7.1 || ^8.0",
10-
"phpstan/phpstan": "^0.12.82"
11-
},
12-
"conflict": {
13-
"doctrine/collections": "<1.0",
14-
"doctrine/common": "<2.7",
15-
"doctrine/mongodb-odm": "<1.2",
16-
"doctrine/orm": "<2.5",
17-
"doctrine/persistence": "<1.3"
18-
},
19-
"require-dev": {
20-
"doctrine/annotations": "^1.11.0",
21-
"doctrine/collections": "^1.6",
22-
"doctrine/common": "^2.7 || ^3.0",
23-
"doctrine/dbal": "^2.13.1",
24-
"doctrine/mongodb-odm": "^1.3 || ^2.1",
25-
"doctrine/orm": "^2.5",
26-
"doctrine/persistence": "^1.1 || ^2.0",
27-
"phing/phing": "^2.16.3",
28-
"php-parallel-lint/php-parallel-lint": "^1.2",
29-
"phpstan/phpstan-phpunit": "^0.12.16",
30-
"phpstan/phpstan-strict-rules": "^0.12.5",
31-
"phpunit/phpunit": "^7.5.20",
32-
"ramsey/uuid-doctrine": "^1.5.0"
33-
},
34-
"config": {
35-
"platform": {
36-
"php": "7.3.24",
37-
"ext-mongo": "1.6.16"
38-
},
39-
"sort-packages": true
40-
},
41-
"extra": {
42-
"branch-alias": {
43-
"dev-master": "0.12-dev"
44-
},
45-
"phpstan": {
46-
"includes": [
47-
"extension.neon",
48-
"rules.neon"
49-
]
50-
}
51-
},
52-
"autoload": {
53-
"psr-4": {
54-
"PHPStan\\": "src/"
55-
}
56-
},
57-
"autoload-dev": {
58-
"classmap": [
59-
"tests/"
60-
]
61-
},
62-
"minimum-stability": "dev",
63-
"prefer-stable": true
2+
"name": "phpstan/phpstan-doctrine",
3+
"type": "phpstan-extension",
4+
"description": "Doctrine extensions for PHPStan",
5+
"license": [
6+
"MIT"
7+
],
8+
"require": {
9+
"php": "^7.1 || ^8.0",
10+
"phpstan/phpstan": "^0.12.82"
11+
},
12+
"conflict": {
13+
"doctrine/collections": "<1.0",
14+
"doctrine/common": "<2.7",
15+
"doctrine/mongodb-odm": "<1.2",
16+
"doctrine/orm": "<2.5",
17+
"doctrine/persistence": "<1.3"
18+
},
19+
"require-dev": {
20+
"doctrine/annotations": "^1.11.0",
21+
"doctrine/collections": "^1.6",
22+
"doctrine/common": "^2.7 || ^3.0",
23+
"doctrine/dbal": "^2.13.1",
24+
"doctrine/mongodb-odm": "^1.3 || ^2.1",
25+
"doctrine/orm": "^2.5",
26+
"doctrine/persistence": "^1.1 || ^2.0",
27+
"php-parallel-lint/php-parallel-lint": "^1.2",
28+
"phpstan/phpstan-phpunit": "^0.12.16",
29+
"phpstan/phpstan-strict-rules": "^0.12.5",
30+
"phpunit/phpunit": "^7.5.20",
31+
"ramsey/uuid-doctrine": "^1.5.0"
32+
},
33+
"config": {
34+
"platform": {
35+
"php": "7.3.24",
36+
"ext-mongo": "1.6.16"
37+
},
38+
"sort-packages": true
39+
},
40+
"extra": {
41+
"branch-alias": {
42+
"dev-master": "0.12-dev"
43+
},
44+
"phpstan": {
45+
"includes": [
46+
"extension.neon",
47+
"rules.neon"
48+
]
49+
}
50+
},
51+
"autoload": {
52+
"psr-4": {
53+
"PHPStan\\": "src/"
54+
}
55+
},
56+
"autoload-dev": {
57+
"classmap": [
58+
"tests/"
59+
]
60+
},
61+
"minimum-stability": "dev",
62+
"prefer-stable": true
6463
}

phpcs.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?xml version="1.0"?>
22
<ruleset name="PHPStan Doctrine">
3+
<arg name="colors"/>
4+
<arg name="extensions" value="php"/>
5+
<arg name="encoding" value="utf-8"/>
6+
<arg name="tab-width" value="4"/>
7+
<arg name="cache" value="tmp/cache/phpcs"/>
8+
<arg value="sp"/>
9+
<file>src</file>
10+
<file>tests</file>
311
<rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml">
412
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
513
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
@@ -55,5 +63,6 @@
5563
<property name="rootNamespaces" type="array" value="src=>PHPStan,tests=>PHPStan"/>
5664
</properties>
5765
</rule>
66+
<exclude-pattern>tests/tmp</exclude-pattern>
5867
<exclude-pattern>tests/*/data</exclude-pattern>
5968
</ruleset>

phpunit.xml

Lines changed: 36 additions & 0 deletions
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 for Symfony">
31+
<directory suffix="Test.php">tests</directory>
32+
</testsuite>
33+
</testsuites>
34+
35+
<logging/>
36+
</phpunit>

0 commit comments

Comments
 (0)