What's Changed
Larastan 3.13.0 requires PHPStan 2.3.0 or newer within the 2.x series. Update PHPStan alongside Larastan when upgrading. The PHP and Laravel requirements are unchanged.
Added
- Add
relation-of<Model, Relationship>and infer concrete relationship types in eager-loading arrays passed towith(),withOnly(),load(), andloadMissing()by @canvural in #2562. - Support PHPStan 2.3's opt-in bleeding-edge inference for empty collections and closures from their usage by @canvural in #2562.
Fixed
- Correct collection key types for methods that append or renumber keys, including
concat(),merge(),shift(), andsplice(), by @canvural in #2562. - Report invalid eager-loading column selections paired with callbacks, such as
with(['posts:id' => $callback]), by @canvural in #2562. - Handle a null package manifest path when bootstrapping the application by @canvural in #2562.
- Resolve forwarded Eloquent builder calls using the custom query builder returned by
toBase(), including passthru return types, by @Wirone in #2575.
New Contributors
Full Changelog: v3.12.3...v3.13.0