PHPackages                             adrum/inertia-phpstan - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. adrum/inertia-phpstan

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

adrum/inertia-phpstan
=====================

PHPStan extension to validate Inertia.js page existence on disk

v1.0.0(11mo ago)81.6k↑100%2[1 PRs](https://github.com/adrum/inertia-phpstan/pulls)MITPHPPHP ^8.1

Since Jul 28Pushed 11mo agoCompare

[ Source](https://github.com/adrum/inertia-phpstan)[ Packagist](https://packagist.org/packages/adrum/inertia-phpstan)[ RSS](/packages/adrum-inertia-phpstan/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Inertia PHPStan Extension
=========================

[](#inertia-phpstan-extension)

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

Features
--------

[](#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
------------

[](#installation)

```
composer require --dev adrum/inertia-phpstan
```

Configuration
-------------

[](#configuration)

Add the extension to your `phpstan.neon`:

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

Usage
-----

[](#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
----------------------------

[](#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
-------------------------

[](#supported-file-extensions)

- `.vue`
- `.jsx`
- `.tsx`
- `.js`
- `.ts`

Example
-------

[](#example)

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance53

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

330d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1464185?v=4)[Austin Drummond](/maintainers/adrum)[@adrum](https://github.com/adrum)

---

Top Contributors

[![adrum](https://avatars.githubusercontent.com/u/1464185?v=4)](https://github.com/adrum "adrum (2 commits)")

---

Tags

PHPStanlaravelstatic analysisinertia

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adrum-inertia-phpstan/health.svg)

```
[![Health](https://phpackages.com/badges/adrum-inertia-phpstan/health.svg)](https://phpackages.com/packages/adrum-inertia-phpstan)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.5k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79173.3M2.0k](/packages/phpstan-phpstan-symfony)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4813.1M82](/packages/shipmonk-dead-code-detector)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67070.7M1.3k](/packages/phpstan-phpstan-doctrine)[ekino/phpstan-banned-code

Detected banned code using PHPStan

2996.0M111](/packages/ekino-phpstan-banned-code)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
