Custom Issues

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

  • NoEnvOutsideConfigenv() called outside the application’s config directory
  • InvalidConsoleArgumentNameargument() references undefined console command argument
  • InvalidConsoleOptionNameoption() references undefined console command option
  • MissingViewview() references a non-existent Blade template (opt-in)
  • MissingTranslation__() or trans() references an undefined translation key (opt-in)
  • ModelMakeDiscouragedModel::make() used instead of new Model()
  • OctaneIncompatibleBindingsingleton() closure resolves a request-scoped service such as Request, Session, or Auth (auto-enabled when laravel/octane is installed)
  • PublicModelScopepublic #[Scope] Eloquent query scope, whose static call is a runtime fatal (reported at error levels 1 to 4)
  • PublicModelAccessorpublic 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() that matches no known attribute
  • 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

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.