Custom Issues

The plugin ships advanced Laravel-aware static analysis checks that extend Psalm’s built-in diagnostics:

  • NoEnvOutsideConfig — env() called outside the application’s config directory
  • InvalidConsoleArgumentName — argument() references undefined console command argument
  • InvalidConsoleOptionName — option() references undefined console command option
  • MissingView — a view name passed to view(), Factory, ResponseFactory, Router, MailMessage, or TestResponse methods references a non-existent Blade template (reported at error levels 1 to 4)
  • MissingTranslation — __() or trans() references an undefined translation key (opt-in)
  • UnconfiguredFilesystemDisk — Storage::disk()/drive() references a disk name not present in filesystems.disks (reported at error levels 1 to 4)
  • SerializedQueuedModel — a queued class holds an Eloquent model in a property without reaching SerializesModels, so the whole model is written into the queue payload (reported at error levels 1 to 4)
  • ModelMakeDiscouraged — Model::make() used instead of new Model()
  • OctaneIncompatibleBinding — singleton() closure resolves a request-scoped service such as Request, Session, or Auth (auto-enabled when laravel/octane is installed)
  • PublicModelScope — public #[Scope] Eloquent query scope, whose static call is a runtime fatal (reported at error levels 1 to 4)
  • PublicModelAccessor — public legacy getXxxAttribute() / setXxxAttribute() accessor or mutator, a pure convention nit (reported at error level 1)
  • ImplicitQueryBuilderCall — a query builder or local scope method called directly on a model instead of through an explicit query() entry point (opt-in)
  • UnknownModelAttribute — a typo’d key passed to a model’s create() / fill() / update(), or to a builder or relation creation call (Post::query()->create(), $user->posts()->createMany()), that matches no known attribute (reported at error levels 1 to 4)
  • UnresolvableAppendedModelAttribute — an Eloquent $appends entry with no backing accessor or class cast, a runtime BadMethodCallException on toArray() / toJson()
  • UndefinedModelRelation — a relation name passed to with(), load(), has(), whereHas(), and similar methods that does not resolve to a relationship on the model
  • MissingViewData: a Blade template declares a variable (@var docblock, @props) that the view() call site rendering it never passes (needs Blade analysis)
  • InvalidViewData: the value passed for a Blade template variable does not satisfy the type that template declares for it (needs Blade analysis)
  • BladeCompileError: a template failed to compile and was excluded from analysis (needs Blade analysis)
  • UnusedViewData: a view() call site passes a data key that neither the rendered template nor anything it includes reads or declares (needs Blade analysis)
  • UnregisteredRouteName — route(), to_route(), URL::route(), Redirect::route(), redirect()->route(), or url()->route() references a route name that is not registered (opt-in)

Each issue page explains what it detects, why it matters, and how to fix it.


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.