-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
56 lines (53 loc) · 3.86 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
56 lines (53 loc) · 3.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
parameters:
reportUnmatchedIgnoredErrors: false
level: max
paths:
- src
- tests/
excludePaths:
- tests/Application
- tests/Functional/Api/JsonApiTestCase.php
ignoreErrors:
# phpstan/phpstan-phpunit 1.x ships stubs for PHPUnit 9–11. Under PHPUnit 12, MockBuilder::method() returns the
# rebased PHPUnit\Framework\MockObject\Builder\InvocationMocker class that the 1.x stubs don't know about, so every
# createMock(...)->method(...) chain in the tests trips this single message. Bumping phpstan-phpunit to ^2.0 would fix
# it but requires bumping phpstan core to ^2.x and every other phpstan extension along with it — out of scope here.
- identifier: class.notFound
message: '/Call to method method\(\) on an unknown class PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\./'
path: tests/
- identifier: staticMethod.dynamicCall
message: '/Dynamic call to static method PHPUnit\\Framework\\TestCase::createStub\(\)\./'
path: tests/
# spaze/phpstan-stripe stubs (v3.x targeting stripe-php ^17) declare strict array{...} shapes for Stripe\Service\* methods.
# The plugin builds params via tagged InnerParamsProviderInterface composites returning array<int|string, mixed>,
# so feeding them into typed service params trips the stubs. Until the stubs accept generic arrays again, ignore here.
- message: '/Parameter \#(1|2) \$params of method Stripe\\Service\\.+::(all|create|retrieve|capture|cancel|expire)\(\) expects array\{.+\}\|null, array<int\|string, mixed>\|null given\./'
paths:
- src/Manager/AllManagerTrait.php
- src/Manager/CreateManagerTrait.php
- src/Manager/RetrieveManagerTrait.php
- src/Manager/Checkout/ExpireManager.php
- src/Manager/WebElements/CancelManager.php
- src/Manager/WebElements/CaptureManager.php
- message: '/Method FluxSE\\SyliusStripePlugin\\Stripe\\HttpClient\\PsrClient::[^\(]+\(\) has parameter \$[^ ]+ with no value type specified in iterable type array\./'
path: src/Stripe/HttpClient/PsrClient.php
- message: '/Method FluxSE\\SyliusStripePlugin\\Stripe\\HttpClient\\PsrClient::[^\(]+\(\) return type has no value type specified in iterable type array\./'
path: src/Stripe/HttpClient/PsrClient.php
- message: '/Parameter #1 \$params of static method Stripe\\Util\\Util::encodeParameters\(\) expects array, mixed given\./'
path: src/Stripe/HttpClient/PsrClient.php
- message: '/Parameter #1 \$name of method Psr\\Http\\Message\\MessageInterface::withHeader\(\) expects string, string\|null given\./'
path: src/Stripe/HttpClient/PsrClient.php
- message: '/Parameter #2 \$value of method Psr\\Http\\Message\\MessageInterface::withHeader\(\) expects array<string>\|string, string\|null given\./'
path: src/Stripe/HttpClient/PsrClient.php
- message: '/Property [^\s]+ \([^\)]+\) does not accept object\|null\./'
paths:
- tests/Functional/Api/Shop/PaymentRequestsTest.php
- tests/Functional/Provider/Checkout/Create/DetailsProviderTest.php
- tests/Functional/Provider/WebElements/Create/DetailsProviderTest.php
- message: '/Cannot call method getProjectDir\(\) on Symfony\\Component\\HttpKernel\\KernelInterface\|null\./'
paths:
- tests/Functional/Provider/Checkout/Create/DetailsProviderTest.php
- tests/Functional/Provider/WebElements/Create/DetailsProviderTest.php
- message: '/Call to method arrayNode\(\) on an unknown class Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder<Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition>\./'
paths:
- src/DependencyInjection/Configuration.php