Skip to content

Commit f79eb89

Browse files
mcfedrlookyman
authored andcommittedApr 28, 2019
Seperate rules from extension as in other phpstan extensions
1 parent 1f1527e commit f79eb89

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed
 

‎README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ parameters:
3737
container_xml_path: '%rootDir%/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml'
3838
```
3939

40-
You have to provide a path to `srcDevDebugProjectContainer.xml` or similar xml file describing your container.
40+
You have to provide a path to `srcApp_KernelDevDebugContainer.xml` or similar xml file describing your container.
41+
42+
To perform framework-specific checks, include also this file:
43+
44+
```
45+
includes:
46+
- vendor/phpstan/phpstan-symfony/rules.neon
47+
```
4148

4249
## Constant hassers
4350

‎composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"phpstan": {
2020
"includes": [
21-
"extension.neon"
21+
"extension.neon",
22+
"rules.neon"
2223
]
2324
}
2425
},

‎extension.neon

-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ parameters:
44
constant_hassers: true
55
console_application_loader: null
66

7-
rules:
8-
- PHPStan\Rules\Symfony\ContainerInterfacePrivateServiceRule
9-
- PHPStan\Rules\Symfony\ContainerInterfaceUnknownServiceRule
10-
- PHPStan\Rules\Symfony\UndefinedArgumentRule
11-
- PHPStan\Rules\Symfony\InvalidArgumentDefaultValueRule
12-
- PHPStan\Rules\Symfony\UndefinedOptionRule
13-
- PHPStan\Rules\Symfony\InvalidOptionDefaultValueRule
14-
157
services:
168
# console resolver
179
-

‎rules.neon

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules:
2+
- PHPStan\Rules\Symfony\ContainerInterfacePrivateServiceRule
3+
- PHPStan\Rules\Symfony\ContainerInterfaceUnknownServiceRule
4+
- PHPStan\Rules\Symfony\UndefinedArgumentRule
5+
- PHPStan\Rules\Symfony\InvalidArgumentDefaultValueRule
6+
- PHPStan\Rules\Symfony\UndefinedOptionRule
7+
- PHPStan\Rules\Symfony\InvalidOptionDefaultValueRule

0 commit comments

Comments
 (0)
Please sign in to comment.