Skip to content

Commit 96fcbce

Browse files
committed
Seperate rules from extension as in other phpstan extensions
1 parent 1ef2927 commit 96fcbce

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ parameters:
3636

3737
You have to provide a path to `srcDevDebugProjectContainer.xml` or similar xml file describing your container.
3838

39+
To perform framework-specific checks, include also this file:
40+
41+
```
42+
includes:
43+
- vendor/phpstan/phpstan-phpunit/rules.neon
44+
```
45+
3946
## Constant hassers
4047

4148
Sometimes, when you are dealing with optional dependencies, the `::has()` methods can cause problems. For example, the following construct would complain that the condition is always either on or off, depending on whether you have the dependency for `service` installed:

extension.neon

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ parameters:
22
symfony:
33
constant_hassers: true
44

5-
rules:
6-
- PHPStan\Rules\Symfony\ContainerInterfacePrivateServiceRule
7-
- PHPStan\Rules\Symfony\ContainerInterfaceUnknownServiceRule
8-
95
services:
106
# service map
117
symfony.serviceMapFactory:

rules.neon

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rules:
2+
- PHPStan\Rules\Symfony\ContainerInterfacePrivateServiceRule
3+
- PHPStan\Rules\Symfony\ContainerInterfaceUnknownServiceRule

0 commit comments

Comments
 (0)