You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
75
75
-**Callable types inside unions displayed ambiguously.**`(Closure(int): string)|Foo` was formatted as `Closure(int): string|Foo`, which reads as a callable returning `string|Foo`. Callable types inside unions are now wrapped in parentheses.
76
76
-**Hover and go-to-definition on attributes.** Attributes on properties, class constants, function/method parameters, and enum cases are now recognized by the symbol map. Previously only attributes on classes, methods, and top-level functions produced navigable symbols; hovering or Ctrl+Clicking an attribute on a property (e.g. `#[Assert\NotBlank]`) did nothing.
77
77
-**Function-level `@template` with `array<TKey, TValue>` parameters.** Template substitution at call sites now correctly resolves generic wrapper names like `array`, `iterable`, and `list`. Previously, `collect($users)->first()->` failed to infer the element type because the wrapper name was incorrectly discarded during binding classification.
78
+
-**Variadic parameter element type lost in `foreach`.** Iterating over a variadic parameter (e.g. `foreach ($placeholders as $value)` where the method declares `HtmlString|int|string ...$placeholders`) now resolves the loop variable to the element type. Previously the variable was untyped, breaking both completion and `instanceof` narrowing inside the loop body.
78
79
-**Stack overflow when a foreach value variable shadows the iterator receiver.** Patterns like `foreach ($category->getBranch() as $category)` caused infinite recursion during type resolution because resolving the value variable re-entered the same foreach. The foreach resolver now detects this cycle at the AST level and skips the recursive path. A depth guard on `resolve_variable_types` provides a safety net for any remaining recursive patterns.
79
80
-**PHPStan diagnostics hidden when a native diagnostic exists on the same line.** Full-line PHPStan diagnostics were suppressed whenever any precise native diagnostic appeared on the same line, even for completely unrelated issues. For example, `class.prefixed` was hidden because a native `unknown_class` diagnostic covered the same line. Deduplication now only suppresses a full-line diagnostic when the precise diagnostic on that line reports a related issue.
80
81
-**Deprecated class in `implements` now renders with strikethrough.** Verified and tested that `DiagnosticTag::DEPRECATED` applies correctly for deprecated classes referenced in `implements` clauses, matching the existing coverage for `new`, type hints, and `extends`. Also verified that `$this`/`self`/`static` resolve to the correct class in files with multiple class declarations.
Copy file name to clipboardExpand all lines: docs/todo.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,6 @@ within the same impact tier.
26
26
| B6 |[Scope methods not found on Builder in analyzer chains](todo/bugs.md#b6-scope-methods-not-found-on-builder-in-analyzer-chains)| High | Medium |
27
27
| L11 |[`whereHas` closure parameter type from relation traversal](todo/laravel.md#l11-wherehas--wheredoesnthave-closure-parameter-type-from-relation-traversal)| Medium | Medium |
28
28
| B7 |[PHPDoc `@param` generic array type not merged with native `array` hint](todo/bugs.md#b7-phpdoc-param-generic-array-type-not-merged-with-native-array-hint)| Low | Medium |
29
-
| B8 |[Variadic parameter element type lost in `foreach`](todo/bugs.md#b8-variadic-parameter-element-type-lost-in-foreach)| Low | Low |
| H10 |[`return.unusedType` — remove unused type from return union](todo/phpstan-actions.md#h10-returnunusedtype--remove-unused-type-from-return-union)| Medium | Medium |
32
31
| H6 |`return.type` — update return type to match actual returns | Medium | Medium |
0 commit comments