packagist psalm/plugin-laravel v4.19.0

latest releases: v4.19.5, v4.19.4, v4.19.3...
6 days ago

Four runtime-failure checks on by default, typed Livewire views, and factory relation helpers.

Rules enabled by default

  • MissingView, UnconfiguredFilesystemDisk, SerializedQueuedModel and UnknownModelAttribute now run by default: errors at errorLevel 1 to 4, info above (#2214)
    • A psalm.xml from psalm-laravel init v3.11.0+ has <findMissingViews value="false" />. Delete it to enable MissingView.

Features

  • Type Livewire component views from their class ($this, public properties) (#2206)
  • Type has{Relation}() / for{Relation}() on Eloquent factories (#2219)
 $user = User::factory()->hasLinks(2)->create();
-// UndefinedMagicMethod: Magic method Database\Factories\UserFactory::haslinks does not exist
+// $user is User
  • Type require 'bootstrap/app.php' in artisan and public/index.php as the booted Application (#2218)

Fixes

  • Fix UndefinedModelRelation reporting relations defined on a model subclass (#2220)
  • Fix UnusedViewData false positives when a custom @include directive passes the whole scope (#2213)

Full Changelog: v4.18.3...v4.19.0

Don't miss a new plugin-laravel release

NewReleases is sending notifications on new releases.