forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
85 lines (75 loc) · 6.32 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
includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
- vendor/jangregor/phpstan-prophecy/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon
parameters:
level: 6
reportUnmatchedIgnoredErrors: false
paths:
- 'src/'
excludePaths:
# Test dependencies
- '**/spec/**.php'
- '**/Bundle/*/test/**.php'
- '**/Bundle/*/test/app/**.php'
- '**/Bundle/*/test/src/**.php'
- '**/Bundle/*/Tests/**.php'
- 'src/Sylius/Behat/**.php'
# Vendor files in subpackages
- '**/Bundle/*/vendor/**.php'
- '**/Component/*/vendor/**.php'
# Deprecated classes
- 'src/Sylius/Bundle/CoreBundle/Application/Kernel.php'
- 'src/Sylius/Bundle/UserBundle/Security/UserPasswordEncoder.php'
# To investigate, occurs after release of doctrine/orm 2.14, the processing of these classes ends with exit code 143
- 'src/Sylius/Bundle/CoreBundle/Doctrine/DQL/**.php'
- 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/SqlWalker/**.php'
# To support both sylius/resource-bundle 1.11 and older versions
- 'src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php'
- 'src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php'
- 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php'
- 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php'
- 'src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php'
- 'src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php'
- 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ChannelCodeCollectionValidator.php'
- 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php'
- 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php'
- 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php'
- 'src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php'
- 'src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php'
- 'src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php'
- 'src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php'
- 'src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php'
- 'src/Sylius/Component/Core/Factory/ChannelFactory.php'
- 'src/Sylius/Component/Core/Factory/PaymentMethodFactory.php'
- 'src/Sylius/Component/Core/Factory/PromotionActionFactory.php'
- 'src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php'
- 'src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php'
- 'src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php'
- 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php'
- 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php'
- 'src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php'
- 'src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php'
- 'src/Sylius/Component/Locale/Provider/LocaleProvider.php'
ignoreErrors:
- '/(Interface|Class) [a-zA-Z\\]+ specifies template type (\w+) of interface [a-zA-Z\\]+ as [a-zA-Z\\]+ (of [a-zA-Z\\]+ )?but it''s already specified as/' # turns off a weird generics check behavior, we are basing on Psalm for generics checks
- '/Access to an undefined property Doctrine\\Common\\Collections\\ArrayCollection/'
- '/Class "Sylius\\Bundle\\CoreBundle\\Fixture\\PaymentFixture" not found/'
- '/Class Symfony\\Component\\Clock\\Clock not found\./'
- '/Class Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken constructor invoked with 4 parameters\, 2\-3 required./'
- '/Method Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface\:\:supportsNormalization\(\) invoked with 3 parameters\, 1\-2 required\./'
- '/Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::normalize\(\) invoked with 2 parameters, 1 required./'
- '/Method Sylius\\Component\\(\w+)\\Model\\(\w+)\:\:getId\(\) has no return type specified./'
- '/Method [a-zA-z\\]+Filter\:\:filterProperty\(\) has parameter \$value with no type specified./'
- '/Method [a-zA-z\\]+Persister\:\:(persist|remove|supports)\(\) has parameter \$data with no type specified./'
# To support both sylius/resource-bundle 1.11 and older versions
- '/Call to an undefined method Sylius\\Resource\\Model\\ResourceInterface::\w+\(\)\./'
- '/Method Sylius\\Component\\Payment\\Resolver\\PaymentMethodsResolver::getSupportedMethods\(\) should return array<Sylius\\Component\\Payment\\Model\\PaymentMethodInterface> but returns array<int, Sylius\\Resource\\Model\\ResourceInterface>\./'
- '/Method Sylius\\Component\\Taxation\\Resolver\\TaxRateResolver::resolve\(\) should return Sylius\\Component\\Taxation\\Model\\TaxRateInterface\|null but returns Sylius\\Resource\\Model\\ResourceInterface\|null\./'
- '/Parameter #\d+ \$(\w+) \(Sylius\\Component\\\w+\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+::\w+\(\) is not contravariant with parameter #\d+ \$(\w+) \(Sylius\\Resource\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+\::\w+\(\)\./'
- '/PHPDoc tag @extends contains generic type Sylius\\Component\\Resource\\\w+\\\w+<Sylius\\Component\\\w+\\Model\\\w+> but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./'
- '/PHPDoc tag @param for parameter \$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+<Sylius\\Component\\\w+\\Model\\\w+> but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./'
- '/PHPDoc type for property Sylius\\Bundle\\\w+\\\w+\\\w+::\$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+<Sylius\\Component\\\w+\\Model\\\w+> but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./'