Skip to content

Commit 91755bf

Browse files
chore: update PHPStan 1 = 2 (#31)
genrate new baseline Co-authored-by: Christopher Georg <christopher.georg@sr-travel.de>
1 parent 81a5af9 commit 91755bf

File tree

2 files changed

+34
-53
lines changed

2 files changed

+34
-53
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"zenstruck/callback": "^1.1"
2020
},
2121
"require-dev": {
22-
"phpstan/phpstan": "^1.4",
22+
"phpstan/phpstan": "^2.1.31",
2323
"phpunit/phpunit": "^9.6.21",
2424
"symfony/messenger": "^5.4|^6.0|^7.0",
2525
"symfony/phpunit-bridge": "^6.0|^7.0",

phpstan-baseline.neon

Lines changed: 33 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,68 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:first\\(\\) should return T of Zenstruck\\\\Mailer\\\\Test\\\\TestEmail but returns Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\.$#"
4+
message: '#^Trait Zenstruck\\Mailer\\Test\\Bridge\\Zenstruck\\Browser\\MailerExtension is used zero times and is not analysed\.$#'
5+
identifier: trait.unused
56
count: 1
6-
path: src/SentEmails.php
7+
path: src/Bridge/Zenstruck/Browser/MailerExtension.php
78

89
-
9-
message: "#^Method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:last\\(\\) should return T of Zenstruck\\\\Mailer\\\\Test\\\\TestEmail but returns Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\.$#"
10+
message: '#^Trait Zenstruck\\Mailer\\Test\\InteractsWithMailer is used zero times and is not analysed\.$#'
11+
identifier: trait.unused
1012
count: 1
11-
path: src/SentEmails.php
12-
13-
-
14-
message: "#^Parameter \\#1 \\$filter of method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:where\\(\\) expects callable\\(Symfony\\\\Component\\\\Mime\\\\Email\\|Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\)\\: bool, Closure\\(Symfony\\\\Component\\\\Mime\\\\Email\\)\\: bool given\\.$#"
15-
count: 7
16-
path: src/SentEmails.php
13+
path: src/InteractsWithMailer.php
1714

1815
-
19-
message: "#^Parameter \\#1 \\$filter of method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:where\\(\\) expects callable\\(Symfony\\\\Component\\\\Mime\\\\Email\\|Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\)\\: bool, Closure\\(Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\)\\: bool given\\.$#"
16+
message: '#^Call to an undefined method Symfony\\Component\\Mime\\Email\:\:attachPart\(\)\.$#'
17+
identifier: method.notFound
2018
count: 1
2119
path: src/SentEmails.php
2220

2321
-
24-
message: "#^Method Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\:\\:as\\(\\) should return T of Zenstruck\\\\Mailer\\\\Test\\\\TestEmail but returns \\$this\\(Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\)\\.$#"
25-
count: 1
26-
path: src/TestEmail.php
27-
28-
-
29-
message: "#^Parameter \\#1 \\$events of static method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:fromEvents\\(\\) expects Symfony\\\\Component\\\\Mailer\\\\Event\\\\MessageEvents, Symfony\\\\Component\\\\Mailer\\\\Event\\\\MessageEvents\\|null given\\.$#"
30-
count: 1
31-
path: src/TestMailer.php
32-
33-
-
34-
message: "#^Cannot call method getBodyAsString\\(\\) on Symfony\\\\Component\\\\Mime\\\\Header\\\\HeaderInterface\\|null\\.$#"
22+
message: '#^Call to function method_exists\(\) with Symfony\\Component\\Mime\\Email and ''addPart'' will always evaluate to true\.$#'
23+
identifier: function.alreadyNarrowedType
3524
count: 1
36-
path: tests/Fixture/CustomTestEmail.php
37-
38-
-
39-
message: "#^Call to method add\\(\\) on an unknown class Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
40-
count: 2
41-
path: tests/Fixture/Kernel.php
42-
43-
-
44-
message: "#^Class Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder not found\\.$#"
45-
count: 1
46-
path: tests/Fixture/Kernel.php
25+
path: src/SentEmails.php
4726

4827
-
49-
message: "#^Parameter \\$routes of method Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\Fixture\\\\Kernel\\:\\:configureRoutes\\(\\) has invalid type Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
28+
message: '#^Method Zenstruck\\Mailer\\Test\\SentEmails\:\:first\(\) should return T of Zenstruck\\Mailer\\Test\\TestEmail but returns Zenstruck\\Mailer\\Test\\TestEmail\.$#'
29+
identifier: return.type
5030
count: 1
51-
path: tests/Fixture/Kernel.php
52-
53-
-
54-
message: "#^Access to an undefined static property Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\InteractsWithMailerTest\\:\\:\\$container\\.$#"
55-
count: 2
56-
path: tests/InteractsWithMailerTest.php
31+
path: src/SentEmails.php
5732

5833
-
59-
message: "#^Parameter \\#1 \\$class of method Zenstruck\\\\Mailer\\\\Test\\\\SentEmails\\:\\:all\\(\\) expects class\\-string\\<Zenstruck\\\\Mailer\\\\Test\\\\TestEmail\\>, string given\\.$#"
34+
message: '#^Method Zenstruck\\Mailer\\Test\\SentEmails\:\:last\(\) should return T of Zenstruck\\Mailer\\Test\\TestEmail but returns Zenstruck\\Mailer\\Test\\TestEmail\.$#'
35+
identifier: return.type
6036
count: 1
61-
path: tests/InteractsWithMailerTest.php
37+
path: src/SentEmails.php
6238

6339
-
64-
message: "#^Access to an undefined static property Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\NonInteractsWithMailerTest\\:\\:\\$container\\.$#"
65-
count: 1
66-
path: tests/NonInteractsWithMailerTest.php
40+
message: '#^Parameter \#1 \$filter of method Zenstruck\\Mailer\\Test\\SentEmails\:\:where\(\) expects callable\(Symfony\\Component\\Mime\\Email\|Zenstruck\\Mailer\\Test\\TestEmail\)\: bool, Closure\(Symfony\\Component\\Mime\\Email\)\: bool given\.$#'
41+
identifier: argument.type
42+
count: 7
43+
path: src/SentEmails.php
6744

6845
-
69-
message: "#^Access to an undefined static property Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\NonKernelTestCaseTest\\:\\:\\$booted\\.$#"
46+
message: '#^Parameter \#1 \$filter of method Zenstruck\\Mailer\\Test\\SentEmails\:\:where\(\) expects callable\(Symfony\\Component\\Mime\\Email\|Zenstruck\\Mailer\\Test\\TestEmail\)\: bool, Closure\(Zenstruck\\Mailer\\Test\\TestEmail\)\: bool given\.$#'
47+
identifier: argument.type
7048
count: 1
71-
path: tests/NonKernelTestCaseTest.php
49+
path: src/SentEmails.php
7250

7351
-
74-
message: "#^Access to an undefined static property Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\NonKernelTestCaseTest\\:\\:\\$container\\.$#"
52+
message: '#^Call to function is_a\(\) with arguments class\-string\<T of Zenstruck\\Mailer\\Test\\TestEmail\>, ''Zenstruck\\\\Mailer\\\\Test\\\\TestEmail'' and true will always evaluate to true\.$#'
53+
identifier: function.alreadyNarrowedType
7554
count: 1
76-
path: tests/NonKernelTestCaseTest.php
55+
path: src/TestEmail.php
7756

7857
-
79-
message: "#^Call to an undefined static method Zenstruck\\\\Mailer\\\\Test\\\\Tests\\\\NonKernelTestCaseTest\\:\\:getContainer\\(\\)\\.$#"
58+
message: '#^Method Zenstruck\\Mailer\\Test\\TestEmail\:\:as\(\) should return T of Zenstruck\\Mailer\\Test\\TestEmail but returns \$this\(Zenstruck\\Mailer\\Test\\TestEmail\)\.$#'
59+
identifier: return.type
8060
count: 1
81-
path: tests/NonKernelTestCaseTest.php
61+
path: src/TestEmail.php
8262

8363
-
84-
message: "#^Call to function method_exists\\(\\) with 'Zenstruck\\\\\\\\Mailer\\\\\\\\Test\\\\\\\\Tests\\\\\\\\NonKernelTestCaseTest' and 'getContainer' will always evaluate to false\\.$#"
64+
message: '#^Parameter \#1 \$events of static method Zenstruck\\Mailer\\Test\\SentEmails\:\:fromEvents\(\) expects Symfony\\Component\\Mailer\\Event\\MessageEvents, Symfony\\Component\\Mailer\\Event\\MessageEvents\|null given\.$#'
65+
identifier: argument.type
8566
count: 1
86-
path: tests/NonKernelTestCaseTest.php
67+
path: src/TestMailer.php
8768

0 commit comments

Comments
 (0)