Skip to content

Commit 51b171a

Browse files
srmnqSaraGfroerer
andauthored
Phpstan (#26)
* Add phpstan-deprecated and -unit Co-authored-by: Sara Gfrörer <[email protected]>
1 parent 6e8961f commit 51b171a

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
vendor
33
composer.lock
44
.phpunit.result.cache
5+
/data/

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@
2323
"@tests-spec"
2424
],
2525
"tests": "phpunit tests",
26-
"analyze": "phpstan analyse --level max src",
26+
"analyze": "phpstan analyse --level max",
2727
"tests-spec": "phpspec run --no-interaction"
2828
},
2929
"require-dev": {
3030
"phpspec/phpspec": "^6.2",
31-
"phpunit/phpunit": "^9.3",
32-
"phpstan/phpstan": "^0.12"
31+
"phpunit/phpunit": "^9.4",
32+
"phpstan/phpstan": "^0.12.51",
33+
"phpstan/phpstan-deprecation-rules": "^0.12.4",
34+
"phpstan/phpstan-phpunit": "^0.12.16",
35+
"squizlabs/php_codesniffer": "^3.5.5"
3336
},
3437
"autoload": {
3538
"psr-4": {

phpstan.neon.dist

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
includes:
2+
- vendor/phpstan/phpstan-phpunit/extension.neon
3+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
parameters:
5+
tmpDir: data
6+
level: max
7+
paths:
8+
- src

phpunit.xml.dist

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation = "./vendor/phpunit/phpunit/phpunit.xsd"
4+
cacheResultFile="./data/phpunit.result.cache"
5+
colors = "true">
6+
<testsuites>
7+
<testsuite name="Unit">
8+
<directory suffix="Test.php">./tests/</directory>
9+
</testsuite>
10+
</testsuites>
11+
</phpunit>

0 commit comments

Comments
 (0)