packagist nunomaduro/larastan v3.15.0
3.15.0

2 hours ago

What's Changed

Larastan 3.15.0 requires PHPStan 2.3.5 or newer within the 2.x series. Update PHPStan alongside Larastan when upgrading. The PHP and Laravel requirements are unchanged.

Added

  • Infer Arr::mapWithKeys() callback parameter types and the mapped array's key and value types by @canvural in 0a72cb7.
  • Keep pivot model types in collections returned by BelongsToMany and MorphToMany relations with the opt-in pivotTypesInCollections parameter, disabled by default, by @canvural in #2634. Read more about it here.
  • Register Larastan's extensions using PHPStan DI attributes by @canvural in #2639.

Fixed

  • Use custom pivot accessor names set with as() in BelongsToMany results by @canvural in #2634.
  • Preserve static and $this model types in SoftDeletes builder methods, including onlyTrashed(), withTrashed(), withoutTrashed(), restoreOrCreate(), and createOrRestore(), by @odolbeau in #2617.
  • Use the model's getForeignKey() when reading foreignIdFor() column names in migrations by @APX403 in #2638.
  • Read columns declared with foreignUuidFor() and foreignUlidFor() in migrations by @APX403 in #2638.
  • Return the query result collection from Eloquent insertOrIgnoreReturning() calls on Laravel 13.30.1 and newer by @canvural in ad65a79.
  • Handle reordered named arguments in rules and collectors, including view and translation usage detection, by @canvural in 3923362.

New Contributors

Full Changelog: v3.14.0...v3.15.0

Don't miss a new larastan release

NewReleases is sending notifications on new releases.