1
1
parameters:
2
- level: 6
2
+ level: 5
3
3
paths:
4
4
- src
5
5
- tests
6
6
- tests/Fixtures/app/console
7
7
inferPrivatePropertyTypeFromConstructor: true
8
8
symfony:
9
- container_xml_path: %rootDir%/../../../ tests/Fixtures/app/var/cache/test/appAppKernelTestDebugContainer.xml
9
+ container_xml_path: tests/Fixtures/app/var/cache/test/appAppKernelTestDebugContainer.xml
10
10
constant_hassers: false
11
11
autoload_files:
12
- - %rootDir%/../../../ tests/Fixtures/app/AppKernel.php
12
+ - tests/Fixtures/app/AppKernel.php
13
13
excludes_analyse:
14
- - %rootDir%/../../../ tests/Fixtures/app/var/cache
14
+ - tests/Fixtures/app/var/cache
15
15
# The Symfony Configuration API isn't good enough to be analysed
16
- - %rootDir%/../../../ src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
16
+ - src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
17
17
# Imported code (temporary)
18
- - %rootDir%/../../../src/Bridge/Symfony/Bundle/Test/BrowserKitAssertionsTrait.php
19
- - %rootDir%/../../../tests/Bridge/Symfony/Bundle/Test/WebTestCaseTest.php
18
+ - src/Bridge/Symfony/Bundle/Test/BrowserKitAssertionsTrait.php
19
+ - tests/Bridge/Symfony/Bundle/Test/WebTestCaseTest.php
20
+ earlyTerminatingMethodCalls:
21
+ PHPUnit\Framework\Constraint\Constraint:
22
+ - fail
20
23
ignoreErrors:
21
24
# Real problems, hard to fix
22
25
- '#Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder::add\(\) expects array\|object, string given\.#'
23
26
-
24
27
message: '#Return type \(int\) of method ApiPlatform\\Core\\Identifier\\Normalizer\\IntegerDenormalizer::denormalize\(\) should be compatible with return type \(array\|object\) of method Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface::denormalize\(\)#'
25
- path: %currentWorkingDirectory%/ src/Identifier/Normalizer/IntegerDenormalizer.php
28
+ path: src/Identifier/Normalizer/IntegerDenormalizer.php
26
29
27
30
# False positives
28
31
-
29
32
message: '#Variable \$iri might not be defined\.#'
30
- path: %currentWorkingDirectory%/ src/JsonApi/Serializer/ItemNormalizer.php
33
+ path: src/JsonApi/Serializer/ItemNormalizer.php
31
34
-
32
35
message: '#Variable \$positionPm might not be defined\.#'
33
- path: %currentWorkingDirectory%/ src/Util/ClassInfoTrait.php
36
+ path: src/Util/ClassInfoTrait.php
34
37
-
35
- message: ' #Cannot assign offset .+ to bool\.#'
36
- path: %currentWorkingDirectory%/ src/GraphQl/Serializer/SerializerContextBuilder.php
38
+ message: " #Cannot access offset 'node' on bool\\.#"
39
+ path: src/GraphQl/Serializer/SerializerContextBuilder.php
37
40
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
38
41
-
39
42
message: '#Call to an undefined method Doctrine\\Persistence\\ObjectManager::getConnection\(\)#'
40
- path: %currentWorkingDirectory%/ src/Bridge/Doctrine/Common/Util/IdentifierManagerTrait.php
43
+ path: src/Bridge/Doctrine/Common/Util/IdentifierManagerTrait.php
41
44
# https://github.com/willdurand/Negotiation/issues/89#issuecomment-513283286
42
45
-
43
46
message: '#Call to an undefined method Negotiation\\AcceptHeader::getType\(\)\.#'
44
- path: %currentWorkingDirectory%/ src/EventListener/AddFormatListener.php
47
+ path: src/EventListener/AddFormatListener.php
45
48
# https://github.com/symfony/symfony/issues/31814#issuecomment-498749590
46
49
-
47
50
message: '#Call to an undefined method Symfony\\Component\\Security\\Core\\Role\\RoleHierarchyInterface::getReachableRoles\(\)\.#'
48
- path: %currentWorkingDirectory%/src/Security/ResourceAccessChecker.php
49
- - '#Parameter \#1 \$function of function call_user_func expects callable\(\): mixed, .+ given\.#'
50
- - '#Parameter \#1 \$exception of static method Symfony\\Component\\Debug\\Exception\\FlattenException::create\(\) expects Exception, Symfony\\Component\\Serializer\\Exception\\ExceptionInterface given\.#'
51
- - '#Parameter \#1 \$classes of class ApiPlatform\\Core\\Metadata\\Resource\\ResourceNameCollection constructor expects array<string>, array<int, int\|string> given\.#'
51
+ path: src/Security/ResourceAccessChecker.php
52
52
- '#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\.#'
53
53
- '#Parameter \#1 \$defaultContext of class Symfony\\Component\\Serializer\\Encoder\\Json(De|En)code constructor expects array, (int|true) given\.#'
54
54
- '#Parameter \#(2|3) \$(resourceMetadataFactory|pagination) of class ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Extension\\PaginationExtension constructor expects (ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface\|Symfony\\Component\\HttpFoundation\\RequestStack|ApiPlatform\\Core\\DataProvider\\Pagination\|ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface), stdClass given\.#'
55
- - '#Parameter \#[0-9] \$filterLocator of class ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Extension\\FilterExtension constructor expects ApiPlatform\\Core\\Api\\FilterCollection|Psr\\Container\\ContainerInterface(\|null)?, ArrayObject given\.#'
55
+ # https://github.com/phpDocumentor/ReflectionDocBlock/pull/209
56
56
-
57
- message: '#Parameter \#1 \$resource of method ApiPlatform\\Core\\Metadata\\Extractor\\XmlExtractor::getAttributes \(\) expects SimpleXMLElement, object given\.#'
58
- path: %currentWorkingDirectory%/ src/Metadata/Extractor/XmlExtractor .php
57
+ message: '#Parameter \#1 \$docblock of method phpDocumentor\\Reflection\\DocBlockFactoryInterface::create \(\) expects string, ReflectionClass<mixed> given\.#'
58
+ path: src/Metadata/Resource/Factory/PhpDocResourceMetadataFactory .php
59
59
-
60
- message: '#Parameter \#1 \$docblock of method phpDocumentor\\Reflection\\DocBlockFactoryInterface::create\(\) expects string, ReflectionClass given\.#'
61
- path: %currentWorkingDirectory%/src/Metadata/Resource/Factory/PhpDocResourceMetadataFactory.php
60
+ message: '#Parameter \#[0-9] \$filterLocator of class .+ constructor expects ApiPlatform\\Core\\Api\\FilterCollection|Psr\\Container\\ContainerInterface, ArrayObject<mixed, mixed> given\.#'
61
+ paths:
62
+ - tests/Bridge/Doctrine/Orm/Extension/FilterExtensionTest.php
63
+ - tests/Bridge/NelmioApiDoc/Extractor/AnnotationsProvider/ApiPlatformProviderTest.php
64
+ - tests/Hydra/Serializer/CollectionFiltersNormalizerTest.php
65
+ - tests/Swagger/Serializer/DocumentationNormalizerV2Test.php
66
+ - tests/Swagger/Serializer/DocumentationNormalizerV3Test.php
62
67
-
63
68
message: '#Parameter \#1 \$objectValue of method GraphQL\\Type\\Definition\\InterfaceType::resolveType\(\) expects object, array(<string, string>)? given.#'
64
- path: %currentWorkingDirectory%/tests/GraphQl/Type/TypeBuilderTest.php
65
- -
66
- message: '#Property ApiPlatform\\Core\\Test\\DoctrineMongoDbOdmFilterTestCase::\$repository \(Doctrine\\ODM\\MongoDB\\Repository\\DocumentRepository\) does not accept Doctrine\\Persistence\\ObjectRepository\.#'
67
- path: %currentWorkingDirectory%/src/Test/DoctrineMongoDbOdmFilterTestCase.php
68
- -
69
- message: '#Property ApiPlatform\\Core\\Test\\DoctrineOrmFilterTestCase::\$repository \(Doctrine\\ORM\\EntityRepository\) does not accept Doctrine\\Persistence\\ObjectRepository\.#'
70
- path: %currentWorkingDirectory%/src/Test/DoctrineOrmFilterTestCase.php
71
- - '#Method ApiPlatform\\Core\\Util\\RequestParser::parseRequestParams\(\) should return array but returns array\|false\.#'
69
+ path: tests/GraphQl/Type/TypeBuilderTest.php
70
+ # https://github.com/phpstan/phpstan-doctrine/issues/115
72
71
-
73
- message: '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Util\\QueryBuilderHelper::mapJoinAliases() should return array<string, array<string>\|string> but returns array<int|string, mixed>\.#'
74
- path: %currentWorkingDirectory%/src/Bridge/Doctrine/Orm/Util/QueryBuilderHelper.php
75
- # https://github.com/phpstan/phpstan/issues/1482
72
+ message: '#Property ApiPlatform\\Core\\Test\\DoctrineMongoDbOdmFilterTestCase::\$repository \(Doctrine\\ODM\\MongoDB\\Repository\\DocumentRepository\) does not accept Doctrine\\ORM\\EntityRepository<ApiPlatform\\Core\\Tests\\Fixtures\\TestBundle\\Document\\Dummy>\.#'
73
+ path: src/Test/DoctrineMongoDbOdmFilterTestCase.php
76
74
-
77
- message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'removeBindings' will always evaluate to false\\.#"
78
- path: %currentWorkingDirectory%/tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php
75
+ message: "#Call to method PHPUnit\\\\Framework\\\\Assert::assertSame\\(\\) with array\\('(collection_context|item_context|subresource_context)'\\) and array<Symfony\\\\Component\\\\VarDumper\\\\Cloner\\\\Data>\\|bool\\|float\\|int\\|string\\|null will always evaluate to false\\.#"
76
+ path: tests/Bridge/Symfony/Bundle/DataCollector/RequestDataCollectorTest.php
77
+ # https://github.com/phpstan/phpstan-phpunit/issues/62
79
78
-
80
- message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'getReachableRoleNam.+' will always evaluate to false\\.#"
81
- path: %currentWorkingDirectory%/tests/Security/EventListener/DenyAccessListenerTest.php
82
- -
83
- message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'getRoleNames' will always evaluate to false\\.#"
84
- path: %currentWorkingDirectory%/tests/Security/EventListener/DenyAccessListenerTest.php
85
- - "#Call to method PHPUnit\\\\Framework\\\\Assert::assertSame\\(\\) with array\\('(collection_context|item_context|subresource_context)'\\) and array<Symfony\\\\Component\\\\VarDumper\\\\Cloner\\\\Data>\\|bool\\|float\\|int\\|string\\|null will always evaluate to false\\.#"
79
+ message: '#Call to method PHPUnit\\Framework\\Assert::assertSame\(\) with 2 and int will always evaluate to false\.#'
80
+ path: tests/Identifier/Normalizer/IntegerDenormalizerTest.php
86
81
-
87
82
message: '#Binary operation "\+" between (float\|int\|)?string and 0 results in an error\.#'
88
- path: %currentWorkingDirectory%/ src/Bridge/Doctrine/Common/Filter/RangeFilterTrait.php
83
+ path: src/Bridge/Doctrine/Common/Filter/RangeFilterTrait.php
89
84
# https://github.com/phpstan/phpstan-symfony/issues/27
90
85
-
91
86
message: '#Service "api_platform\.json_schema\.schema_factory" is private\.#'
92
- path: %currentWorkingDirectory%/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php
87
+ path: src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php
88
+ -
89
+ message: '#Service "api_platform\.iri_converter" is private\.#'
90
+ path: src/Bridge/Symfony/Bundle/Test/ApiTestCase.php
91
+ # https://github.com/phpstan/phpstan-symfony/issues/76
92
+ -
93
+ message: '#Service "api_platform\.graphql\.fields_builder" is private\.#'
94
+ path: src/GraphQl/Type/TypeBuilder.php
93
95
-
94
- message: '#Service "api_platform.iri_converter" is private\.#'
95
- path: %currentWorkingDirectory%/src/Bridge/Symfony/Bundle/Test/ApiTestCase.php
96
+ message: '#Service "test" is not registered in the container\.#'
97
+ path: tests/GraphQl/Type/TypesContainerTest.php
98
+ # https://github.com/phpstan/phpstan/issues/2999
99
+ -
100
+ message: '#ArrayObject<string, string> does not accept true\.#'
101
+ path: src/JsonSchema/SchemaFactory.php
102
+ -
103
+ message: '#ArrayObject<string, string> does not accept array<string, mixed>\.#'
104
+ path: src/JsonSchema/SchemaFactory.php
105
+ -
106
+ message: '#Cannot assign new offset to string\.#'
107
+ path: src/JsonSchema/SchemaFactory.php
96
108
97
109
# Expected, due to optional interfaces
98
110
- '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Extension\\QueryCollectionExtensionInterface::applyToCollection\(\) invoked with 5 parameters, 3-4 required\.#'
@@ -115,11 +127,4 @@ parameters:
115
127
# Expected, due to backward compatibility
116
128
-
117
129
message: "#Call to function method_exists\\(\\) with ApiPlatform\\\\Core\\\\JsonApi\\\\Serializer\\\\ItemNormalizer and 'setCircularReferenc…' will always evaluate to false\\.#"
118
- path: %currentWorkingDirectory%/tests/JsonApi/Serializer/ItemNormalizerTest.php
119
-
120
- # Expected, due to forward compatibility
121
- -
122
- message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'getThrowable' will always evaluate to false\\.#"
123
- paths:
124
- - %currentWorkingDirectory%/tests/Bridge/Symfony/Validator/EventListener/ValidationExceptionListenerTest.php
125
- - %currentWorkingDirectory%/tests/EventListener/ExceptionListenerTest.php
130
+ path: tests/JsonApi/Serializer/ItemNormalizerTest.php
0 commit comments