Skip to content

Commit 3a9d85d

Browse files
committed
chore: refine phpstan config
1 parent 703e984 commit 3a9d85d

5 files changed

Lines changed: 183 additions & 29 deletions

File tree

.phpactor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "/phpactor.schema.json",
3+
"language_server_phpstan.enabled": true,
4+
"language_server_php_cs_fixer.enabled": true
5+
}

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"brainmaestro/composer-git-hooks": "^3.0",
2222
"friendsofphp/php-cs-fixer": "^3.75",
2323
"phpseclib/phpseclib": "^2.0",
24+
"phpstan/extension-installer": "^1.4",
25+
"phpstan/phpstan-phpunit": "^2.0",
2426
"phpunit/phpunit": "^9.0"
2527
},
2628
"autoload": {
@@ -34,7 +36,10 @@
3436
}
3537
},
3638
"config": {
37-
"sort-packages": true
39+
"sort-packages": true,
40+
"allow-plugins": {
41+
"phpstan/extension-installer": true
42+
}
3843
},
3944
"scripts": {
4045
"check": ["@cs-fixer:check", "@phpstan", "@test:coverage"],

composer.lock

Lines changed: 160 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon.dist

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
parameters:
2-
level: max
2+
level: 0
33
paths:
44
- ./src
55
- ./test
6-
includes:
7-
- vendor/phpstan/phpstan-mockery/extension.neon

phpunit.xml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
<?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-
bootstrap="./vendor/autoload.php"
5-
colors="true"
6-
cacheDirectory="./build/cache/phpunit">
7-
8-
<testsuites>
9-
<testsuite name="unit-tests">
10-
<directory>./test</directory>
11-
</testsuite>
12-
</testsuites>
13-
14-
<coverage/>
15-
16-
<php>
17-
<ini name="memory_limit" value="1G"/>
18-
</php>
19-
20-
<source>
21-
<include>
22-
<directory>./src</directory>
23-
</include>
24-
</source>
25-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" stderr="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Plugins SDK unit test suite">
10+
<directory>test</directory>
11+
</testsuite>
12+
</testsuites>
2613
</phpunit>

0 commit comments

Comments
 (0)