|
1 | 1 | # PHPantom — Ignored Fixture Tasks |
2 | 2 |
|
3 | | -There are **228 fixture tests** in `tests/fixtures/`. Of these, **178 |
4 | | -pass** and **50 are ignored** because they exercise features or bug |
| 3 | +There are **228 fixture tests** in `tests/fixtures/`. Of these, **183 |
| 4 | +pass** and **45 are ignored** because they exercise features or bug |
5 | 5 | fixes that are not yet implemented. Each ignored fixture has a |
6 | 6 | `// ignore:` comment explaining what is missing. |
7 | 7 |
|
8 | | -This document groups the 50 ignored fixtures by the underlying work |
| 8 | +This document groups the 45 ignored fixtures by the underlying work |
9 | 9 | needed to un-ignore them. Tasks are ordered by the number of fixtures |
10 | 10 | they unblock (descending), then by estimated effort. Once a task is |
11 | 11 | complete, remove the `// ignore:` line from each fixture, verify the |
@@ -172,31 +172,6 @@ work without further changes. |
172 | 172 |
|
173 | 173 | --- |
174 | 174 |
|
175 | | -## 6. `@method` with `static`/`$this` return type on parent (2 fixtures) |
176 | | - |
177 | | -**Ref:** [type-inference.md §26](type-inference.md#26-method-with-static-or-this-return-type-on-parent-class) |
178 | | -**Impact: Medium · Effort: Low-Medium** |
179 | | - |
180 | | -When a parent class declares `@method static foo()` or |
181 | | -`@method $this bar()`, calling the method on a child class should |
182 | | -return the child class type. Virtual method return types are not |
183 | | -rewritten through the inheritance chain today. |
184 | | - |
185 | | -**Fixtures:** |
186 | | - |
187 | | -- [ ] `virtual_member/method_returns_static.fixture` — `@method static foo()` on parent, called on child |
188 | | -- [ ] `virtual_member/method_returns_this.fixture` — `@method $this bar()` on parent, called on child |
189 | | - |
190 | | -**Implementation notes:** |
191 | | - |
192 | | -During inheritance merging, when copying virtual methods from a parent |
193 | | -class, apply the same `static`/`$this`/`self` return type rewriting |
194 | | -that already works for regular methods. Check `rewrite_self_static` in |
195 | | -`inheritance.rs` and ensure it also processes `MethodInfo` entries that |
196 | | -originated from `@method` tags. |
197 | | - |
198 | | ---- |
199 | | - |
200 | 175 | ## 7. Invoked closure/arrow function return type (2 fixtures) |
201 | 176 |
|
202 | 177 | **Ref:** [type-inference.md §30](type-inference.md#30-invoked-closurearrow-function-return-type) |
@@ -243,32 +218,6 @@ name is a variable, resolve the variable's type. If it is |
243 | 218 |
|
244 | 219 | --- |
245 | 220 |
|
246 | | -## 9. Enum case instance properties (2 fixtures) |
247 | | - |
248 | | -**Ref:** [bugs.md §9](bugs.md#9-enum-case-instance-properties-not-shown-in---completion) |
249 | | -**Impact: Medium · Effort: Low** |
250 | | - |
251 | | -`->` completion on an enum case does not show the `name` property |
252 | | -(available on all enums via `UnitEnum`) or the `value` property |
253 | | -(available on backed enums via `BackedEnum`). The enum's own methods |
254 | | -and trait methods appear, but these built-in properties are missing. |
255 | | - |
256 | | -**Fixtures:** |
257 | | - |
258 | | -- [ ] `enum/enum_case_members.fixture` — `$case->name` available on unit enum |
259 | | -- [ ] `enum/backed_enum_case_members.fixture` — `$case->value` and `$case->name` on backed enum |
260 | | - |
261 | | -**Implementation notes:** |
262 | | - |
263 | | -During enum class resolution (or in the completion builder), inject |
264 | | -synthetic `PropertyInfo` entries for `name` (type `string`, on all |
265 | | -enums) and `value` (type matching the backing type, on backed enums). |
266 | | -These are defined by the `UnitEnum` and `BackedEnum` interfaces in the |
267 | | -stubs, so alternatively ensure that enum resolution inherits from those |
268 | | -interfaces and their properties are included. |
269 | | - |
270 | | ---- |
271 | | - |
272 | 221 | ## 10. Mixed `->` then `::` accessor chaining (2 fixtures) |
273 | 222 |
|
274 | 223 | **Ref:** [bugs.md §10](bugs.md#10-mixed-arrow-then-static-accessor-chaining-not-resolved) |
@@ -307,20 +256,7 @@ merging. |
307 | 256 |
|
308 | 257 | --- |
309 | 258 |
|
310 | | -## 12. Sequential `assert()` calls do not accumulate (1 fixture) |
311 | | - |
312 | | -**Ref:** [type-inference.md §22](type-inference.md#22-sequential-assert-calls-do-not-accumulate) |
313 | | -**Impact: Low-Medium · Effort: Low** |
314 | 259 |
|
315 | | -Multiple `assert($x instanceof Foo); assert($x instanceof Bar);` |
316 | | -statements should accumulate. Only the last assertion's narrowing |
317 | | -applies today. |
318 | | - |
319 | | -**Fixture:** |
320 | | - |
321 | | -- [ ] `combination/intersect_interface_assert.fixture` — sequential assert narrows to both types |
322 | | - |
323 | | ---- |
324 | 260 |
|
325 | 261 | ## 13. Compound negated guard clause narrowing (1 fixture) |
326 | 262 |
|
@@ -504,14 +440,11 @@ Quick wins (Low effort, 1 fixture each): |
504 | 440 | | Task | Fixture | |
505 | 441 | |---|---| |
506 | 442 | | §23 `@phpstan-type` in foreach | `type/phpstan_type_alias` | |
507 | | -| §12 Sequential assert accumulation | `combination/intersect_interface_assert` | |
508 | 443 |
|
509 | 444 | Moderate wins (Low-Medium effort, multiple fixtures): |
510 | 445 |
|
511 | 446 | | Task | Fixtures | |
512 | 447 | |---|---| |
513 | | -| §6 `@method` static/`$this` rewriting | 2 | |
514 | | -| §9 Enum case `name`/`value` properties | 2 | |
515 | 448 | | §10 Mixed `->` then `::` chaining | 2 | |
516 | 449 |
|
517 | 450 | Biggest unlocks (Medium effort, many fixtures): |
|
0 commit comments