New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

adrum/inertia-phpstan

PHPStan extension to validate Inertia.js page existence on disk
7,570 8

Larablocks Analysis

adrum/inertia-phpstan works with any PHP project: the latest release (v1.0.0, Jul 28, 2025) doesn't depend on Laravel.

Recommendation checks

Use with care

Use with care: meets 0 of 3 checks.

  • No release in the last 12 months (last: Jul 28, 2025)
  • 3,199 downloads a month (needs 10,000)
  • 8 GitHub stars (needs 100)

State

Quiet
  • Last stable release: Jul 28, 2025.
  • No releases in the last 12 months.
  • First released: Jul 28, 2025.
  • Monthly downloads: 3,199, up 255% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require adrum/inertia-phpstan
Latest Version:v1.0.0
PHP:^8.1
License:MIT
Last Updated:Jul 28, 2025
Links: GitHub  ·  Packagist
Maintainer: adrum

Inertia PHPStan Extension

A PHPStan extension that validates Inertia.js page existence on disk when used in Laravel controllers.

Features

  • Validates Inertia::render() static calls
  • Validates inertia() helper function calls
  • Validates $this->inertia() method calls in controllers
  • Supports multiple page directory configurations
  • Supports various file extensions (.vue, .jsx, .tsx, .js, .ts)
  • Handles both dot notation (Auth.Login) and slash notation (Auth/Login) for page names

Installation

composer require --dev adrum/inertia-phpstan

Configuration

Add the extension to your phpstan.neon:

includes:
    - vendor/adrum/inertia-phpstan/extension.neon

Usage

The extension will automatically validate that Inertia pages exist on disk when analyzing your controllers:

class UserController extends Controller
{
    public function dashboard()
    {
        // ✓ Will pass if resources/js/Pages/Dashboard.vue exists
        return Inertia::render('Dashboard');
    }

    public function profile()
    {
        // ✗ Will fail if resources/js/Pages/Profile/Edit.vue doesn't exist
        return Inertia::render('Profile/Edit');
    }
}

Page Directory Configuration

The extension looks for pages in these directories by default:

  • resources/js/Pages
  • resources/js/pages
  • resources/ts/Pages
  • resources/ts/pages
  • resources/vue/Pages
  • resources/vue/pages
  • resources/react/Pages
  • resources/react/pages

Supported File Extensions

  • .vue
  • .jsx
  • .tsx
  • .js
  • .ts

Example

See the examples/ directory for a sample controller and PHPStan configuration.

Alternatives to adrum/inertia-phpstan

script-development/phpstan-warroom-rules

Canonical PHPStan rules enforcing war-room doctrine across script-development La...

38,881 0
nth-root/phpstan-security

A PHPStan extension that checks your code for security vulnerabilities

2,790 5
happenv-com/laravel-true-modular-phpstan

PHPStan extensions for laravel-true-modular: dynamic Eloquent relation resolutio...

4,858 0
odinns/phpstan-pest-this

PHPStan extensions to infer Pest closure $this type from test file mappings.

4,658 1
imsuperlative/larastan-filament-macro

PHPStan extension for Filament's Macroable trait — runtime macro method resoluti...

24,269 5

Version History

Version Released PHP License
v1.0.0 ^8.1 MIT