Skip to content

Commit ad25bae

Browse files
committed
Forward compatibility - define parameters schema
1 parent 82d2236 commit ad25bae

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"require": {
1919
"php": "~7.1",
20-
"phpstan/phpstan": "^0.11.6",
20+
"phpstan/phpstan": "^0.11.7",
2121
"phpstan/phpdoc-parser": "^0.3",
2222
"nikic/php-parser": "^4.0"
2323
},

extension.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ parameters:
55
allCollectionsSelectable: true
66
objectManagerLoader: null
77

8+
parametersSchema:
9+
doctrine: structure([
10+
repositoryClass: schema(string(), nullable())
11+
queryBuilderClass: schema(string(), nullable())
12+
allCollectionsSelectable: bool()
13+
objectManagerLoader: schema(string(), nullable())
14+
])
15+
816
conditionalTags:
917
PHPStan\Reflection\Doctrine\DoctrineSelectableClassReflectionExtension:
1018
phpstan.broker.methodsClassReflectionExtension: %doctrine.allCollectionsSelectable%

rules.neon

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ parameters:
22
doctrine:
33
reportDynamicQueryBuilders: false
44

5+
parametersSchema:
6+
doctrine: structure([
7+
repositoryClass: schema(string(), nullable())
8+
queryBuilderClass: schema(string(), nullable())
9+
allCollectionsSelectable: bool()
10+
objectManagerLoader: schema(string(), nullable())
11+
reportDynamicQueryBuilders: bool()
12+
])
13+
514
rules:
615
- PHPStan\Rules\Doctrine\ORM\DqlRule
716
- PHPStan\Rules\Doctrine\ORM\MagicRepositoryMethodCallRule

0 commit comments

Comments
 (0)