adrum/inertia-phpstan
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 careUse 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 |
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/Pagesresources/js/pagesresources/ts/Pagesresources/ts/pagesresources/vue/Pagesresources/vue/pagesresources/react/Pagesresources/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
Canonical PHPStan rules enforcing war-room doctrine across script-development La...
A PHPStan extension that checks your code for security vulnerabilities
PHPStan extensions for laravel-true-modular: dynamic Eloquent relation resolutio...
PHPStan extensions to infer Pest closure $this type from test file mappings.
PHPStan extension for Filament's Macroable trait — runtime macro method resoluti...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v1.0.0 | ^8.1 | MIT |