-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathphpstan-baseline.neon
More file actions
180 lines (155 loc) · 9.12 KB
/
Copy pathphpstan-baseline.neon
File metadata and controls
180 lines (155 loc) · 9.12 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# This baseline exists solely to work around a PHPStan regression introduced in 2.2.6, not
# to silence real bugs. It was introduced deliberately, not autogenerated as a matter of
# course — read this header before extending it.
#
# Root cause (upstream: https://github.com/phpstan/phpstan/issues/15047):
# when a method overrides an abstract parent whose docblock declares a WIDER `@param`
# (here `@param \stdClass $data` on AbstractJsonRepresentation/AbstractJsonSrcData), the
# overriding method's NARROWER `@param \stdClass&object{...}` object shape stops taking
# effect. The parameter resolves to `mixed`, so every property read off it is `mixed`, which
# level 10 then flags at the call site. Inheritance is the trigger: the identical class and
# method analysed without the abstract parent are clean on every version, and removing the
# parent's `@param` line alone also clears it.
#
# Confirmed by bisection on a 30-line reproduction outside this codebase: clean on 2.2.5,
# erroring on 2.2.6, 2.2.7 and 2.2.8. Not caused by the guard style — `??`, `isset()`
# ternary, `property_exists()` ternary and an intermediate local variable all behave the
# same — nor by the parameter name differing between parent and child, nor by
# `treatPhpDocTypesAsCertain`. Only level 10 surfaces it.
#
# Every entry below is one instance of that pattern; none indicates an actual defect. When
# the upstream issue is fixed, delete the entries rather than regenerating: PHPStan reports
# unmatched ignores by default, so a stale entry will fail `composer analyse` and tell you
# it is time to remove this file.
parameters:
ignoreErrors:
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonSrcData\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemCreateNewMetadata.php
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonSrcData\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemMakeDoctorMetadata.php
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonSrcData\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemSetPropertyGradeMetadata.php
-
message: '#^Parameter \#2 \$url of class LiturgicalCalendar\\Api\\Models\\Decrees\\DecreeItemSetPropertyGradeMetadata constructor expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemSetPropertyGradeMetadata.php
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonSrcData\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemSetPropertyNameMetadata.php
-
message: '#^Parameter \#2 \$url of class LiturgicalCalendar\\Api\\Models\\Decrees\\DecreeItemSetPropertyNameMetadata constructor expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Decrees/DecreeItemSetPropertyNameMetadata.php
-
message: '#^Parameter \#1 \$common of static method LiturgicalCalendar\\Api\\Models\\EventsPath\\LiturgicalEventAbstract\:\:transformCommons\(\) expects array\<LiturgicalCalendar\\Api\\Enum\\LitCommon\|LiturgicalCalendar\\Api\\Enum\\LitMassVariousNeeds\|string\>\|LiturgicalCalendar\\Api\\Models\\Calendar\\LitCommons, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/EventsPath/LiturgicalEventFixed.php
-
message: '#^Parameter \#1 \$common of static method LiturgicalCalendar\\Api\\Models\\EventsPath\\LiturgicalEventAbstract\:\:transformCommons\(\) expects array\<LiturgicalCalendar\\Api\\Enum\\LitCommon\|LiturgicalCalendar\\Api\\Enum\\LitMassVariousNeeds\|string\>\|LiturgicalCalendar\\Api\\Models\\Calendar\\LitCommons, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/EventsPath/LiturgicalEventMobile.php
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonRepresentation\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataDiocesanCalendarItem.php
-
message: '#^Parameter \#6 \$group of class LiturgicalCalendar\\Api\\Models\\Metadata\\MetadataDiocesanCalendarItem constructor expects string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataDiocesanCalendarItem.php
-
message: '#^Parameter \#1 \$value of static method LiturgicalCalendar\\Api\\Enum\\Ascension\:\:tryFrom\(\) expects int\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataDiocesanCalendarSettings.php
-
message: '#^Parameter \#1 \$value of static method LiturgicalCalendar\\Api\\Enum\\CorpusChristi\:\:tryFrom\(\) expects int\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataDiocesanCalendarSettings.php
-
message: '#^Parameter \#1 \$value of static method LiturgicalCalendar\\Api\\Enum\\Epiphany\:\:tryFrom\(\) expects int\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataDiocesanCalendarSettings.php
-
message: '#^Parameter \#5 \$wider_region of class LiturgicalCalendar\\Api\\Models\\Metadata\\MetadataNationalCalendarItem constructor expects string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataNationalCalendarItem.php
-
message: '#^Parameter \#6 \$dioceses of class LiturgicalCalendar\\Api\\Models\\Metadata\\MetadataNationalCalendarItem constructor expects array\<string\>\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/Metadata/MetadataNationalCalendarItem.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\MissalsPath\\MissalYearLimits constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/MissalsPath/MissalYearLimits.php
-
message: '#^Parameter \#4 \$i18n of class LiturgicalCalendar\\Api\\Models\\RegionalData\\DiocesanData\\DiocesanData constructor expects stdClass\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/DiocesanData/DiocesanData.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\RegionalData\\DiocesanData\\DiocesanLitCalItemMetadata constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/DiocesanData/DiocesanLitCalItemMetadata.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\LitCalItemCreateNewMetadata constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/LitCalItemCreateNewMetadata.php
-
message: '#^Parameter \#1 \$data of static method LiturgicalCalendar\\Api\\Models\\AbstractJsonSrcData\:\:fromObject\(\) expects stdClass, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/LitCalItemMakePatronMetadata.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\LitCalItemMakePatronMetadata constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/LitCalItemMakePatronMetadata.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\LitCalItemSetPropertyGradeMetadata constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/LitCalItemSetPropertyGradeMetadata.php
-
message: '#^Parameter \#2 \$until_year of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\LitCalItemSetPropertyNameMetadata constructor expects int\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/LitCalItemSetPropertyNameMetadata.php
-
message: '#^Parameter \#4 \$i18n of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\NationalData constructor expects stdClass\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/NationalData.php
-
message: '#^Parameter \#3 \$wider_region of class LiturgicalCalendar\\Api\\Models\\RegionalData\\NationalData\\NationalMetadata constructor expects string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/NationalData/NationalMetadata.php
-
message: '#^Parameter \#4 \$i18n of class LiturgicalCalendar\\Api\\Models\\RegionalData\\WiderRegionData\\WiderRegionData constructor expects stdClass\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Models/RegionalData/WiderRegionData/WiderRegionData.php