tomasvotruba/bladestan

PHPStan rule for static analysis of Blade templates
1,015,286 376
Install
composer require tomasvotruba/bladestan
Latest Version:0.11.8
PHP:^8.2
Laravel:11 · 12 · 13
Older releases:8 · 9 · 10
License:MIT
Last Updated:Oct 10, 2026
Links: GitHub  ·  Packagist
Maintainer: TomasVotruba

codecov

Bladestan

Static analysis for Blade templates in Laravel projects.

Install

composer require tomasvotruba/bladestan --dev

Configure

If you run PHPStan with its extension installer, Bladestan will just work, if not you need to include it in the phpstan.neon configuration file:

includes:
    - ./vendor/tomasvotruba/bladestan/config/extension.neon

Features

Custom Error Formatter

We provide custom PHPStan error formatter to better display the template errors:

  • clickable template file path link to the error in blade template
 ------ -----------------------------------------------------------
  Line   app/Http/Controllers/PostCodexController.php
 ------ -----------------------------------------------------------
  20     Call to an undefined method App\Entity\Post::getContent().
         rendered in: post_codex.blade.php:15
 ------ -----------------------------------------------------------

How to use custom error formatter?

vendor/bin/phpstan analyze --error-format=blade

Credits

Related Packages

tyhpdef/illuminate-collections

Tyhp type definitions for illuminate/collections 13.33.0.

6 0
tyhpdef/illuminate-contracts

Tyhp type definitions for illuminate/contracts 13.33.0.

6 0
tyhpdef/pestphp-pest-plugin-laravel

Tyhp type definitions for pestphp/pest-plugin-laravel 4.1.0.

2 0
tyhpdef/pestphp-pest-plugin-arch

Tyhp type definitions for pestphp/pest-plugin-arch 4.0.2.

1 0
tyhpdef/pestphp-pest

Tyhp type definitions for pestphp/pest 4.7.8.

1 0

Version History

Version Released PHP Laravel License
0.11.8 ^8.2 ^11.15|^12.0|^13.0 MIT
0.11.7 ^8.2 ^11.15|^12.0|^13.0 MIT
0.11.6 ^8.2 ^11.15|^12.0|^13.0 MIT
0.11.5 ^8.2 ^11.15|^12.0 MIT
0.11.4 ^8.2 ^11.15|^12.0 MIT