packagist nunomaduro/larastan v3.13.2
3.13.2

5 hours ago

What's Changed

Added

  • Read CREATE TABLE statements passed as string literals to DB::statement() and DB::unprepared() in migrations, using the same SQL parsers as schema dumps, by @tiagoabsantos in #2564. Read more about it here.
  • Infer Arr::map() callback parameter types and the mapped array type by @Gabrieljr42 in #2587.

Fixed

  • Check model properties in fill() and forceFill() by @uchimaki-vensley in #2618.
  • Check model properties in withAttributes() by @uchimaki-vensley in #2599.
  • Check model properties in forceCreateMany() and forceCreateManyQuietly() by @uchimaki-vensley in #2600.
  • Apply model casts to date columns such as created_at instead of always reading them as dates by @canvural in 453bff0.
  • Resolve the enum type of AsEnumCollection and AsEnumArrayObject casts by @lazerg in #2590.
  • Return int|false from model increment() and decrement(), since an updating listener can cancel the update, by @canvural in 0293dbc.
  • Resolve factory() from the HasFactory generic, including models that set their factory with the $factory property or #[UseFactory], by @mkantautas in #2615 and @canvural in 6dfe581.
  • Keep the model template type in forwarded static calls on a class-string<T>, such as $class::findOrFail($id), by @mkantautas in #2616.
  • Read #[CollectedBy] from parent models on Laravel 13.4 and newer by @APX403 in #2586. Read more about it here.
  • Keep the relation type after calling when() and unless() on a relation by @APX403 in #2603.
  • Accept deeper nesting and closures in nested eager-load arrays passed to with(), withOnly(), load(), and loadMissing() by @lazerg in #2583.
  • Read columns from ulidMorphs(), numericMorphs(), and their nullable variants in migrations by @mkantautas in #2614.
  • Treat rememberToken() columns as nullable by @lazerg in #2611.
  • Fall back to the bundled SQL parser when phpmyadmin/sql-parser can't parse a schema dump, instead of losing every table in it, by @Cayan in #2588.
  • Resolve EventFake methods such as dispatched() and hasDispatched() on the Event facade by @lazerg in #2574.
  • Resolve QueueFake methods such as pushed() and hasPushed() on the Queue facade by @canvural in 9c1d4f4.
  • Detect container, request, and config injection in OctaneCompatibilityRule through any constructor argument, make(), get(), and makeWith() calls, and class-string references by @Gabrieljr42 in #2609.
  • Avoid NoEnvCallsOutsideOfConfigRule false positives when a config file is analysed in editor mode by @billypoke in #2482.
  • Only count Laravel's view() helper when detecting unused views, and report static::make(), self::make(), and parent::make() in NoModelMakeRule, by @GTS-MEGHNI in #2598.

New Contributors

Full Changelog: v3.13.1...v3.13.2

Don't miss a new larastan release

NewReleases is sending notifications on new releases.