@@ -21,6 +21,12 @@ parameters:
2121 checkDeprecatedHooksInApiFiles : false
2222 checkCoreDeprecatedHooksInApiFiles : false
2323 checkContribDeprecatedHooksInApiFiles : false
24+ extensions :
25+ entityFieldsViaMagicReflection : true
26+ entityFieldMethodsViaMagicReflection : true
27+ entityQuery : true
28+ entityRepository : true
29+ stubFiles : true
2430 rules :
2531 testClassSuffixNameRule : false
2632 dependencySerializationTraitPropertyRule : false
@@ -248,6 +254,13 @@ parametersSchema:
248254 checkCoreDeprecatedHooksInApiFiles : boolean ()
249255 checkContribDeprecatedHooksInApiFiles : boolean ()
250256 ])
257+ extensions : structure ([
258+ entityFieldsViaMagicReflection : boolean ()
259+ entityFieldMethodsViaMagicReflection : boolean ()
260+ entityQuery : boolean ()
261+ entityRepository : boolean ()
262+ stubFiles : boolean ()
263+ ])
251264 rules : structure ([
252265 testClassSuffixNameRule : boolean ()
253266 dependencySerializationTraitPropertyRule : boolean ()
@@ -282,10 +295,8 @@ services:
282295 tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
283296 -
284297 class : mglaman\PHPStanDrupal\Type\EntityRepositoryReturnTypeExtension
285- tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
286298 -
287299 class : mglaman\PHPStanDrupal\Type\EntityStorage\GetQueryReturnTypeExtension
288- tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
289300 -
290301 class : mglaman\PHPStanDrupal\Type\ContainerDynamicReturnTypeExtension
291302 tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
@@ -294,10 +305,8 @@ services:
294305 tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
295306 -
296307 class : mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryDynamicReturnTypeExtension
297- tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
298308 -
299309 class : mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryAccessCheckDynamicReturnTypeExtension
300- tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
301310 -
302311 class : mglaman\PHPStanDrupal\Type\EntityAccessControlHandlerReturnTypeExtension
303312 tags : [phpstan.broker.dynamicMethodReturnTypeExtension ]
@@ -312,17 +321,12 @@ services:
312321 tags : [phpstan.broker.dynamicStaticMethodReturnTypeExtension ]
313322 -
314323 class : mglaman\PHPStanDrupal\Reflection\EntityFieldsViaMagicReflectionExtension
315- tags : [phpstan.broker.propertiesClassReflectionExtension ]
316324 -
317325 class : mglaman\PHPStanDrupal\Reflection\EntityFieldMethodsViaMagicReflectionExtension
318- tags : [phpstan.broker.methodsClassReflectionExtension ]
319326 -
320327 class : mglaman\PHPStanDrupal\Drupal\DrupalStubFilesExtension
321- tags : [phpstan.stubFilesExtension ]
322328 -
323329 class : mglaman\PHPStanDrupal\Type\EntityQuery\AccessCheckTypeSpecifyingExtension
324- tags :
325- - phpstan.typeSpecifier.methodTypeSpecifyingExtension
326330 -
327331 class : mglaman\PHPStanDrupal\DeprecatedScope\GroupLegacyScope
328332 tags :
@@ -338,4 +342,22 @@ services:
338342 -
339343 class : mglaman\PHPStanDrupal\Type\InspectorTypeExtension
340344 tags :
341- - phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
345+ - phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
346+
347+ conditionalTags :
348+ mglaman\PHPStanDrupal\Reflection\EntityFieldsViaMagicReflectionExtension :
349+ phpstan.broker.propertiesClassReflectionExtension : %drupal.extensions.entityFieldsViaMagicReflection%
350+ mglaman\PHPStanDrupal\Reflection\EntityFieldMethodsViaMagicReflectionExtension :
351+ phpstan.broker.methodsClassReflectionExtension : %drupal.extensions.entityFieldMethodsViaMagicReflection%
352+ mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryDynamicReturnTypeExtension :
353+ phpstan.broker.dynamicMethodReturnTypeExtension : %drupal.extensions.entityQuery%
354+ mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryAccessCheckDynamicReturnTypeExtension :
355+ phpstan.broker.dynamicMethodReturnTypeExtension : %drupal.extensions.entityQuery%
356+ mglaman\PHPStanDrupal\Type\EntityQuery\AccessCheckTypeSpecifyingExtension :
357+ phpstan.typeSpecifier.methodTypeSpecifyingExtension : %drupal.extensions.entityQuery%
358+ mglaman\PHPStanDrupal\Type\EntityStorage\GetQueryReturnTypeExtension :
359+ phpstan.broker.dynamicMethodReturnTypeExtension : %drupal.extensions.entityQuery%
360+ mglaman\PHPStanDrupal\Type\EntityRepositoryReturnTypeExtension :
361+ phpstan.broker.dynamicMethodReturnTypeExtension : %drupal.extensions.entityRepository%
362+ mglaman\PHPStanDrupal\Drupal\DrupalStubFilesExtension :
363+ phpstan.stubFilesExtension : %drupal.extensions.stubFiles%
0 commit comments