forked from api-platform/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
87 lines (85 loc) · 3.61 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
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:
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
# 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:
- 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
earlyTerminatingMethodCalls:
PHPUnit\Framework\Constraint\Constraint:
- fail
ApiPlatform\Metadata\Resource\ResourceMetadataCollection:
- handleNotFound
ignoreErrors:
# False positives
-
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/
-
message: '#expects ApiPlatform\\Metadata\\GraphQl\\Operation\|null, ApiPlatform\\Metadata\\Operation given#'
paths:
- tests/GraphQl/Resolver/Factory/
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
# https://github.com/willdurand/Negotiation/issues/89#issuecomment-513283286
-
message: '#Call to an undefined method Negotiation\\AcceptHeader::getType\(\)\.#'
path: src/Symfony/EventListener/AddFormatListener.php
# https://github.com/phpstan/phpstan-symfony/issues/76
-
message: '#Service "test" is not registered in the container\.#'
path: tests/GraphQl/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\.#'
- '#Method Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface::supportsNormalization\(\) invoked with 3 parameters, 1-2 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: tests/JsonApi/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\.#'
# See https://github.com/phpstan/phpstan-symfony/issues/27
-
message: '#^Service "[^"]+" is private.$#'
path: src
-
message: '#^Property .+ is unused.$#'
path: tests/Doctrine/Odm/PropertyInfo/Fixtures/DoctrineDummy.php