interaction-design-foundation/psalm-laravel-nova
Psalm plugin for Laravel Nova that improves static analysis by providing accurate type information and stubs for Nova resources, fields, actions, and filters. Helps catch errors earlier and reduces false positives in Psalm checks.
@psalm-suppress everywhere. This plugin is the cheap path to actually type-checking that code.canSee() closures receiving a NovaRequest, and Field::make() resolve callbacks returning typed resources/attributes), so the measured pre-adoption error delta is likely smaller than it would have been on v0.2.2.Adopt when:
canSee() and Field::make() callback fixes remove false positives that would otherwise land in your baseline.canSee()/authorization callbacks and field resolve closures — v0.2.3 may make those redundant.Look elsewhere when:
Evaluation recipe: pin the package, run it against one branch, and compare error counts and false-positive rate before and after. Re-run the same branch against v0.2.2 if you want to see how much of the remaining baseline is stub-coverage rather than genuine type error — the callback-typing fixes in v0.2.3 give a useful signal about whether the maintainer is keeping pace with real-world Nova usage. If the delta is small, write only the stubs you actually need and skip the dependency.
To executives: It's a free, MIT-licensed static-analysis plugin that closes a quality blind spot in our admin panel — the surface our support and ops teams live in every day, and typically the least type-checked part of the app. Cost is one dependency plus a few hours of setup; the alternative is either unanalyzed Nova code or bespoke stubs we build and maintain ourselves. The latest patch release is maintenance-grade: it fixes incorrect typings for two common Nova callback patterns and updates CI dependencies, with no breaking changes and no new surface area, so it de-risks adoption rather than changing the commercial case.
To engineering: It teaches Psalm Nova's dynamic API surface so field, filter and action calls type-check instead of generating false positives, which lets us raise the error level and stop suppressing Nova wholesale. v0.2.3 corrects two of the noisiest false-positive sources — canSee() callbacks that type-hint NovaRequest, and Field::make() resolve callbacks returning typed resources or attributes — so expect a cleaner result from the evaluation spike than earlier versions would have given. The honest caveat is unchanged: this is a tiny, zero-dependent package from a single maintainer organization. Treat it as a forkable stub set, not a vendor — pin it, review it on every Nova upgrade, and assume we may need to patch or replace it. Recommended next step: a one-day spike on a branch to measure the error delta, then a go/no-go between adopt, hand-roll, and exclude.
How can I help you explore Laravel packages today?