-
-
Notifications
You must be signed in to change notification settings - Fork 888
/
phpstan.neon.dist
100 lines (97 loc) · 4.31 KB
/
phpstan.neon.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
parameters:
level: 5
paths:
- src
- tests
- tests/Fixtures/app/console
inferPrivatePropertyTypeFromConstructor: true
symfony:
containerXmlPath: tests/Fixtures/app/var/cache/test/AppKernelTestDebugContainer.xml
constantHassers: false
doctrine:
objectManagerLoader: tests/Fixtures/app/object-manager.php
bootstrapFiles:
# We're aliasing classes for phpunit in this file, it needs to be added here see phpstan/#2194
- src/Symfony/Bundle/Test/Constraint/ArraySubset.php
- tests/Fixtures/app/AppKernel.php
excludePaths:
# uses larastan
- src/Laravel
- src/Symfony/Bundle/Command/OpenApiCommand.php
# Symfony config
- tests/Fixtures/app/config/config_swagger.php
# Symfony cache
- tests/Fixtures/app/var/
- tests/Fixtures/Symfony/Maker
# The Symfony Configuration API isn't good enough to be analysed
- src/Symfony/Bundle/DependencyInjection/Configuration.php
# Templates for Maker
- src/Symfony/Maker/Resources/skeleton
# subtree split
- src/Doctrine/Orm/Tests/var/*
- src/Doctrine/Odm/Tests/var/*
- src/Doctrine/*/vendor/*
- src/*/vendor/*
# Symfony 6 support
- src/OpenApi/Serializer/CacheableSupportsMethodInterface.php
- src/Serializer/CacheableSupportsMethodInterface.php
- tests/Hal/Serializer/ItemNormalizerTest.php
- tests/Symfony/Validator/Metadata/Property/ValidatorPropertyMetadataFactoryTest.php
- src/Symfony/Bundle/ArgumentResolver/CompatibleValueResolverInterface.php
earlyTerminatingMethodCalls:
PHPUnit\Framework\Constraint\Constraint:
- fail
ApiPlatform\Metadata\Resource\ResourceMetadataCollection:
- handleNotFound
ignoreErrors:
# False positives
- message: '#Call to an undefined method Negotiation\\AcceptHeader::getType\(\).#'
-
message: '#but database expects#'
paths:
- tests/Fixtures/TestBundle/Entity/
- '#Cannot call method add\(\) on iterable.#'
-
message: '#is never read, only written.#'
paths:
- tests/Fixtures/TestBundle/Document/
- tests/Fixtures/TestBundle/Entity/
- src/OpenApi/Factory/OpenApiFactory.php
-
message: '#is never written, only read.#'
paths:
- tests/Fixtures/TestBundle/Document/
- src/Metadata/Tests/Fixtures/ApiResource/
-
message: '#Parameter \#1 \$constraint of method#'
paths:
- tests/Symfony/Validator/Metadata/Property/Restriction/
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
# https://github.com/phpstan/phpstan-symfony/issues/76
-
message: '#Service "test" is not registered in the container\.#'
path: src/GraphQl/Tests/Type/TypesContainerTest.php
# Expected, due to optional interfaces
- '#Method Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::denormalize\(\) invoked with (2|3|4) parameters, 1 required\.#'
- '#Method Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::normalize\(\) invoked with (2|3|4) parameters, 1 required\.#'
# Expected, due to backward compatibility
-
message: "#Call to function method_exists\\(\\) with ApiPlatform\\\\JsonApi\\\\Serializer\\\\ItemNormalizer and 'setCircularReferenc…' will always evaluate to false\\.#"
path: src/JsonApi/Tests/Serializer/ItemNormalizerTest.php
- '#Method GraphQL\\Type\\Definition\\WrappingType::getWrappedType\(\) invoked with 1 parameter, 0 required\.#'
- '#Access to an undefined property GraphQL\\Type\\Definition\\NamedType&GraphQL\\Type\\Definition\\Type::\$name\.#'
-
message: '#Instanceof between Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface and Symfony\\Component\\Serializer\\NameConverter\\MetadataAwareNameConverter will always evaluate to false\.#'
paths:
- src/GraphQl/Serializer/SerializerContextBuilder.php
- src/GraphQl/Type/FieldsBuilder.php
-
message: '#Instanceof between Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface\|null and Symfony\\Component\\Serializer\\NameConverter\\MetadataAwareNameConverter will always evaluate to false\.#'
paths:
- src/Serializer/AbstractConstraintViolationListNormalizer.php
- src/Symfony/Validator/Serializer/ValidationExceptionNormalizer.php
# See https://github.com/phpstan/phpstan-symfony/issues/27
-
message: '#^Service "[^"]+" is private.$#'
path: src
- '#Call to an undefined method Symfony\\Component\\HttpFoundation\\Request::getContentType\(\)\.#'