-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathphpstan.neon
85 lines (82 loc) · 5.51 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
includes:
- phpstan-baseline.neon
services:
- # CrudService or CrudServiceInterface rule
class: SwagPaymentPayPalUnified\PhpStan\CustomRules\CrudServiceTest
tags:
- phpstan.rules.rule
parameters:
level: 8
reportUnmatchedIgnoredErrors: true
excludePaths:
- vendor
- .githooks
- Tests/E2E
- templates_c
scanDirectories:
- ../../../var/cache/production____REVISION___/doctrine
symfony:
constant_hassers: false
container_xml_path: ../../../var/cache/production____REVISION___/container.xml
console_application_loader: ../../../tests/phpstan-console-application.php
doctrine:
repositoryClass: Shopware\Components\Model\ModelRepository
objectManagerLoader: ../../../tests/phpstan-doctrine-model-manager.php
bootstrapFiles:
- ../../../tests/phpstan-dba-bootstrap.php
ignoreErrors:
- # Since Shopware 5.3.4 this class has constructor parameter
'#Class Shopware_Components_Translation constructor invoked with 0 parameters, 2 required#'
- # Properties are called with magic __get
'#Access to an undefined property Shopware_Models_Document_Order::#'
- # Has different type in older PHPUnit versions needs for older Shopware versions
message: '#Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert::assertContains\(\) expects iterable, string given#'
path: Tests
- # Compatibititly trait for different Shopware versions
message: '#Call to an undefined method Enlight_Components_Session_Namespace::reset\(\)#'
path: Tests/Functional/ResetSessionTrait.php
# Needs some improvements in the doctrine PHPStan extensions: see https://github.com/phpstan/phpstan-doctrine/pull/167
- '#Cannot call method fetch.*\(\) on Doctrine\\DBAL\\.*\|int#'
# The method TestCase::expectException() expects a class-string<Throwabel>. Throwable only avaiable since PHP 7.0
- '#Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase::expectException\(\) expects class-string<Throwable>#'
- # Ignore PaymentType::* failure in PayPalOrderParameter constructor for tests
message: '#Parameter \#3 \$paymentType of class SwagPaymentPayPalUnified\\Components\\PayPalOrderParameter\\PayPalOrderParameter constructor expects.*given.#'
paths:
- Tests/Functional/Components/Services/OrderBuilder/OrderFactoryTest.php
- # Ignore PaymentType::* failure in Order::setIntent()
message: '#Parameter \#1 \$intent of method SwagPaymentPayPalUnified\\PayPalBundle\\V2\\Api\\Order::setIntent\(\) expects.*given.#'
path: Tests
- # Ignore Class Enlight_Hook_HookArgs constructor because the Enlight_Hook_HookArgs has changed between SW 5.2 and 5.7 and we need to be compatible in the test suite
message: '#Class Enlight_Hook_HookArgs constructor invoked with 1 parameter, 2-3 required.#'
paths:
- Tests/Functional/Subscriber/Documents/InvoiceSubscriberPuiTest.php
- # Ignore ThreeDSecure::setEnrollmentStatus() expects 'B'|'N'|'U'|'Y'
message: '#Parameter \#1 \$enrollmentStatus of method SwagPaymentPayPalUnified\\PayPalBundle\\V2\\Api\\Order\\PaymentSource\\Card\\AuthenticationResult\\ThreeDSecure::setEnrollmentStatus\(\) expects.*given.#'
path: Tests
- # Ignore ThreeDSecure::setAuthenticationStatus() expects 'A'|'C'|'D'|'I'|'N'|'R'|'U'|'Y'
message: '#Parameter \#1 \$authenticationStatus of method SwagPaymentPayPalUnified\\PayPalBundle\\V2\\Api\\Order\\PaymentSource\\Card\\AuthenticationResult\\ThreeDSecure::setAuthenticationStatus\(\) expects.*given.#'
path: Tests
- # Ignore AuthenticationResult::setLiabilityShift() expects 'NO'|'POSSIBLE'|'UNKNOWN'|null
message: '#Parameter \#1 \$liabilityShift of method SwagPaymentPayPalUnified\\PayPalBundle\\V2\\Api\\Order\\PaymentSource\\Card\\AuthenticationResult::setLiabilityShift\(\) expects.*given.#'
path: Tests
- # SQLSTATE[42S22]: Column not found: 1054 Unknown column 'button_locale' in 'field list
message: '#.*Unknown column.*button_locale.*#'
paths:
- Setup/Versions/UpdateTo600.php
- # Ignore $paymentType parameter expects valid PayPal payment types
message: '#Parameter \#. \$paymentType of (method|class).*expects.*string.* given.#'
path: Tests
- # Ignore Parameter should be PaymentMethodProviderInterface::*
message: ' #Parameter \#. \$paymentMethodName of method SwagPaymentPayPalUnified\\Components\\PaymentMethodProvider::getPaymentId\(\) expects.*given.#'
path: Tests
- # Parameter is not available on default
message: '#.*Ternary operator condition is always false.*#'
paths:
- Subscriber/Carrier.php
- # Allow null Parameter value for RequestIdService tests
message: '#Parameter \#1 \$requestId of method SwagPaymentPayPalUnified\\Components\\Services\\RequestIdService::.*\(\) expects string, null given.#'
paths:
- Tests/Functional/Components/Services/RequestIdServiceTest.php
- # Allow simple array as parameter
message: '#Parameter \#2 \$shopwareBasketData of class SwagPaymentPayPalUnified\\Components\\PayPalOrderParameter\\ShopwareOrderData constructor expects array{.*}, array.* given.*#'
path: Components/Services/ExpressCheckout/PatchOrderService.php