forked from GwendolenLynch/msgphp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
68 lines (61 loc) · 4.35 KB
/
phpstan.neon
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
includes:
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan/conf/bleedingEdge.neon
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/rules.neon
parameters:
level: max
paths:
- src
- tests/sa/fixtures
tmpDir: var/phpstan
ignoreErrors:
# forward compatibility
- '#Class Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken not found\.#'
- '#Call to method getOriginalToken\(\) on an unknown class Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken\.#'
# msgphp
- '#Method MsgPhp\\.+\\Infrastructure\\Doctrine\\Repository\\.+Repository::find.*\(\) should return MsgPhp\\.+\\.+ but returns object\.#'
- '#Return type \(MsgPhp\\Domain\\Infrastructure\\Config\\ClassMappingNode\) of method MsgPhp\\Domain\\Infrastructure\\Config\\ClassMappingNodeDefinition::instantiateNode\(\) should be compatible with return type \(Symfony\\Component\\Config\\Definition\\VariableNode\) of method Symfony\\Component\\Config\\Definition\\Builder\\VariableNodeDefinition::instantiateNode\(\)#'
- '#Cannot call method classMappingNode\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null\.#'
- '#Method MsgPhp\\Domain\\Infrastructure\\Elasticsearch\\ProjectionTypeRegistry::all\(\) should return array<string> but returns array<int\|string>.#'
- '#Property MsgPhp\\Domain\\Infrastructure\\Elasticsearch\\ProjectionTypeRegistry::\$types \(array<string>\|null\) does not accept array<int, int\|string>.#'
# msgphp tests
- '#Class MsgPhp\\Domain\\Tests\\Factory\\TestUnknownObject not found\.#'
- '#Constructor of class MsgPhp\\Domain\\Tests\\Factory\\TestKnownObject has an unused parameter \$arg\.#'
- '#Parameter \$arg of method MsgPhp\\Domain\\Tests\\Factory\\TestKnownObject::__construct\(\) has invalid typehint type MsgPhp\\Domain\\Tests\\Factory\\TestUnknownObject\.#'
- '#Class MsgPhp\\Domain\\Tests\\Factory\\TestClassWrongCase referenced with incorrect case: MsgPhp\\Domain\\Tests\\Factory\\testclasswrongcase\.#'
- '#Static property MsgPhp\\.+\\Tests\\.+Test::\$em \(Doctrine\\ORM\\EntityManagerInterface\) does not accept null\.#'
- '#Static property MsgPhp\\.+\\Tests\\.+Test::\$bus \(Symfony\\Component\\Messenger\\MessageBusInterface\) does not accept null\.#'
-
message: '#Call to an undefined method object::.+\(\)\.#'
path: *src/*/Tests/Model/*Test.php
-
message: '#Call to an undefined method object::dispatch\(\)\.#'
path: src/Domain/Tests/Message/MessageDispatchingTraitTest.php
-
message: '#Constructor of class MsgPhp\\Domain\\Tests\\Factory\\TestClass has an unused parameter \$\w+\.#'
path: src/Domain/Tests/Factory/ClassMethodResolverTest.php
# phpstan
- '#Cannot call method getName\(\) on ReflectionClass\|null\.#'
# https://github.com/phpstan/phpstan-phpunit/issues/43
-
message: '''
#Call to static method PHPUnit\\Framework\\Assert::assertSame\(\) with array\(1, '2'\) and array\(1\) will always evaluate to false\.#
'''
path: src/Domain/Tests/GenericDomainCollectionTest.php
# https://github.com/phpstan/phpstan-phpunit/issues/31
-
message: '#Parameter \#1 \$encoder of class MsgPhp\\User\\Infrastructure\\Security\\PasswordHashing constructor expects Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.#'
path: src/User/Tests/Infrastructure/Security/PasswordHashingTest.php
-
message: '#Parameter \#1 \$elements of class MsgPhp\\Domain\\GenericDomainCollection constructor expects iterable, PHPUnit\\Framework\\MockObject\\MockObject given\.#'
path: src/Domain/Tests/GenericDomainCollectionTest.php
excludes_analyse:
- */src/*/vendor/*
- src/UserBundle/Resources/skeleton
- src/UserBundle/Maker/UserMaker.php
services:
-
class: MsgPhp\SA\PHPStan\DomainObjectFactoryTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension