Commit 606a9d1
committed
check included files for defined classes before include
including a file that re-redefines leads to a fatal error, making phpcs
fail hard.
including files from a rule-set while these files may have already been
included (likely by auto-loading and could then be seen as a race-
condition) now checks if it has been already included and if so, searches
all loaded classes for the class-name and if found, verifies the class
is from that file.
this effectively prevents the fatal error and works for classes / files
with a PSR-4 naming scheme.1 parent d2574b9 commit 606a9d1
1 file changed
+44
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 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 | + | |
143 | 175 | | |
144 | 176 | | |
145 | 177 | | |
| |||
166 | 198 | | |
167 | 199 | | |
168 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
169 | 207 | | |
170 | 208 | | |
171 | 209 | | |
| |||
174 | 212 | | |
175 | 213 | | |
176 | 214 | | |
177 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
178 | 221 | | |
179 | 222 | | |
180 | 223 | | |
| |||
0 commit comments