Commit bd25485
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 bd25485
1 file changed
+43
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 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 | + | |
142 | 173 | | |
143 | 174 | | |
144 | 175 | | |
| |||
166 | 197 | | |
167 | 198 | | |
168 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
169 | 206 | | |
170 | 207 | | |
171 | 208 | | |
| |||
174 | 211 | | |
175 | 212 | | |
176 | 213 | | |
177 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
178 | 220 | | |
179 | 221 | | |
180 | 222 | | |
| |||
0 commit comments