{{ message }}
Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
152 lines (148 loc) · 8.86 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
152 lines (148 loc) · 8.86 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
parameters:
level: 5
paths:
- src
- tests
- tests/Fixtures/app/console
inferPrivatePropertyTypeFromConstructor: true
symfony:
container_xml_path: tests/Fixtures/app/var/cache/test/AppKernelTestDebugContainer.xml
constant_hassers: 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:
# Symfony cache
- tests/Fixtures/app/var/cache
# Deprecated integrations (will be removed in API Platform 3)
- src/Core/Bridge/NelmioApiDoc/*
- tests/Core/Bridge/NelmioApiDoc/*
- src/Core/Bridge/FosUser/*
# BC layer
- src/deprecated_interfaces.php
- tests/Symfony/Bundle/DependencyInjection/Compiler/AnnotationFilterPassTest.php
- tests/Core/Annotation/ApiResourceTest.php
- tests/Core/Annotation/ApiPropertyTest.php
- tests/Core/Metadata/Resource/Factory/AnnotationResourceMetadataFactoryTest.php
- tests/Fixtures/TestBundle/BrowserKit/Client.php
# The Symfony Configuration API isn't good enough to be analysed
- src/Symfony/Bundle/DependencyInjection/Configuration.php
# Phpstan runs on phpunit > 9, a signature changed in this file
- src/Symfony/Bundle/Test/Constraint/ArraySubsetLegacy.php
# Imported code (temporary)
- src/Symfony/Bundle/Test/BrowserKitAssertionsTrait.php
- tests/Symfony/Bundle/Test/WebTestCaseTest.php
- tests/Core/ProphecyTrait.php
- tests/Core/Behat/CoverageContext.php
- tests/Core/Behat/DoctrineContext.php
- tests/Fixtures/TestBundle/Security/AbstractSecurityUser.php
# Templates for Maker
- src/Core/Bridge/Symfony/Maker/Resources/skeleton
- src/Bridge/Symfony/Maker/Resources/skeleton
# Rector because new API Platform 3.0 classes don't exist yet
- src/Core/Bridge/Rector
- src/Core/Bridge/Symfony/Bundle/Command/RectorCommand.php
- tests/Core/Bridge/Rector/Rules
earlyTerminatingMethodCalls:
PHPUnit\Framework\Constraint\Constraint:
- fail
ApiPlatform\Metadata\Resource\ResourceMetadataCollection:
- handleNotFound
ignoreErrors:
# False positives
-
message: '#is never read, only written.#'
paths:
- tests/Fixtures/TestBundle/Document/
- tests/Fixtures/TestBundle/Entity/
- src/Core/Identifier/
- src/OpenApi/Factory/OpenApiFactory.php
-
message: '#is never written, only read.#'
paths:
- tests/Fixtures/TestBundle/Document/
- tests/Fixtures/TestBundle/Entity/
-
message: '#Strict comparison using !== between .+ and .+ will always evaluate to false\.#'
paths:
- src/Doctrine/Common/PropertyHelperTrait.php
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
-
message: '#Call to an undefined method Doctrine\\Persistence\\ObjectManager::getConnection\(\)#'
path: src/Core/Bridge/Doctrine/Common/Util/IdentifierManagerTrait.php
# https://github.com/willdurand/Negotiation/issues/89#issuecomment-513283286
-
message: '#Call to an undefined method Negotiation\\AcceptHeader::getType\(\)\.#'
path: src/Symfony/EventListener/AddFormatListener.php
- '#Parameter \#1 \$vars of class GraphQL\\Language\\AST\\(IntValue|ObjectField|ObjectValue|BooleanValue|ListValue|StringValue)Node constructor expects array<bool\|float\|GraphQL\\Language\\AST\\Location\|GraphQL\\Language\\AST\\NameNode\|GraphQL\\Language\\AST\\NodeList\|GraphQL\\Language\\AST\\SelectionSetNode\|int\|string\|null>, array<string, .+> given\.#'
- '#Parameter \#1 \$defaultContext of class Symfony\\Component\\Serializer\\Encoder\\Json(De|En)code constructor expects array, (int|true) given\.#'
- '#Parameter \#(2|3) \$(resourceMetadataFactory|pagination) of class ApiPlatform\\Doctrine\\Orm\\Extension\\PaginationExtension constructor expects (ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface\|Symfony\\Component\\HttpFoundation\\RequestStack|ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface\|ApiPlatform\\State\\Pagination\\Pagination), stdClass given\.#'
-
message: '#Parameter \#[0-9] \$filterLocator of class .+ constructor expects ApiPlatform\\Core\\Api\\FilterCollection|Psr\\Container\\ContainerInterface, ArrayObject<mixed, mixed> given\.#'
paths:
- tests/Doctrine/Orm/Extension/FilterExtensionTest.php
- tests/Hydra/Serializer/CollectionFiltersNormalizerTest.php
- tests/Core/Swagger/Serializer/DocumentationNormalizerV2Test.php
- tests/Core/Swagger/Serializer/DocumentationNormalizerV3Test.php
-
message: '#Parameter \#1 \$objectValue of method GraphQL\\Type\\Definition\\InterfaceType::resolveType\(\) expects object, array(<string, string>)? given.#'
path: tests/GraphQl/Type/TypeBuilderTest.php
# https://github.com/phpstan/phpstan-doctrine/issues/115
-
message: '#Property ApiPlatform\\Test\\DoctrineMongoDbOdmFilterTestCase::\$repository \(Doctrine\\ODM\\MongoDB\\Repository\\DocumentRepository\) does not accept Doctrine\\ORM\\EntityRepository<object>\.#'
path: src/Test/DoctrineMongoDbOdmFilterTestCase.php
# https://github.com/phpstan/phpstan-phpunit/issues/62
-
message: '#Call to method PHPUnit\\Framework\\Assert::assertSame\(\) with 2 and int will always evaluate to false\.#'
path: tests/Core/Identifier/Normalizer/IntegerDenormalizerTest.php
-
message: '#Call to method PHPUnit\\Framework\\Assert::assertSame\(\) with array\{.+\} and array\{.+\} will always evaluate to false\.#'
path: tests/Util/SortTraitTest.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 PHP 8 attributes
- '#Constructor of class ApiPlatform\\Core\\Annotation\\ApiResource has an unused parameter#'
- '#Constructor of class ApiPlatform\\Core\\Annotation\\ApiProperty has an unused parameter#'
# Expected, due to optional interfaces
- '#Method ApiPlatform\\Doctrine\\Orm\\Extension\\QueryCollectionExtensionInterface::applyToCollection\(\) invoked with 5 parameters, 3-4 required\.#'
- '#Method ApiPlatform\\\Doctrine\\Orm\\Extension\\QueryResult(Item|Collection)ExtensionInterface::getResult\(\) invoked with 4 parameters, 1 required\.#'
- '#Method ApiPlatform\\Doctrine\\Orm\\Extension\\QueryResult(Item|Collection)ExtensionInterface::supportsResult\(\) invoked with 3 parameters, 1-2 required\.#'
- '#Method ApiPlatform\\Core\\Bridge\\Symfony\\Routing\\RouteNameResolverInterface::getRouteName\(\) invoked with 3 parameters, 2 required\.#'
- '#Method ApiPlatform\\Core\\DataPersister\\DataPersisterInterface::persist\(\) invoked with 2 parameters, 1 required\.#'
- '#Method ApiPlatform\\Core\\DataPersister\\DataPersisterInterface::remove\(\) invoked with 2 parameters, 1 required\.#'
- '#Method ApiPlatform\\Core\\DataPersister\\DataPersisterInterface::supports\(\) invoked with 2 parameters, 1 required\.#'
- '#Method ApiPlatform\\Core\\DataProvider\\CollectionDataProviderInterface::getCollection\(\) invoked with 3 parameters, 1-2 required\.#'
- '#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 deprecations
- '#Method ApiPlatform\\Doctrine\\Orm\\Filter\\(Abstract|Exists|Order)Filter::filterProperty\(\) invoked with 7 parameters, 5-6 required\.#'
- '#Method ApiPlatform\\Doctrine\\Orm\\Filter\\(AbstractFilter|FilterInterface)::apply\(\) invoked with 5 parameters, 3-4 required\.#'
- '#Method ApiPlatform\\PathResolver\\OperationPathResolverInterface::resolveOperationPath\(\) invoked with 4 parameters, 3 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
# TODO: remove in v3.0
-
message: "#Dead catch - JsonException is never thrown in the try block.#"
path: src/Symfony/Bundle/Test/Response.php
# 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
-
message: '#Call to an undefined method Symfony\\Component\\PropertyInfo\\Type::getCollectionValueType\(\)#'
path: src
-
message: '#Call to an undefined method Symfony\\Component\\PropertyInfo\\Type::getCollectionKeyType\(\)#'
path: src
You can’t perform that action at this time.
