Repository navigation
v0.2.5
Added
- Type inference now follows nullable and nullsafe chains. Member access through
?->, multi-hop chains, cross-namespace member types, and non-generic methods mid-chain all resolve to concrete types -- so hover, inlay hints, and completion stay accurate further into an expression. For example, withCollection<T>::first(): ?Tand$users = new Collection::<User>(),$users->first()?->namenow infers?string; a?->access correctly makes the result nullable, and an intermediate property typed via a cross-namespaceuseimport resolves to its full FQN. - Go to Definition works through nullsafe method chains. Ctrl+click on the final call in a chain like
$bag->first()?->spin()now jumps to the method declaration (previously only plain->chains were followed). - New diagnostic: possible null dereference (
xphp.null-deref). A property/method accessed with plain->on a statically nullable chained receiver is flagged as a Warning -- e.g.$users->first()->namewherefirst()returns?UserreportsAccessing "name" on a possibly-null value (?App\Models\User). Use ?-> or guard against null first.The check is deliberately conservative: it does not fire on the nullsafe form (?->) or on a non-nullable receiver, and it defers bare-variable cases ($x->y) to avoid false positives.
Notes
serverInfo.versionnow reports0.2.5.- All changes are server-side only; no client/plugin update required.
- Internal: a range-bounds invariant ("every emitted range stays within the document") is now locked by tests across the same-document range handlers (semantic tokens, folding, document symbol, code lens, inlay hint, document highlight), guarding against the EOF-anchored "Range must be inside element being annotated" class of crash.
Full Changelog: v0.2.4...v0.2.5