tomasvotruba/bladestan
PHPStan rule for static analysis of Blade templates
769,407
375
| Install | |
|---|---|
composer require tomasvotruba/bladestan |
|
| Latest Version: | 0.11.7 |
| PHP: | ^8.2 |
| License: | MIT |
| Last Updated: | Aug 1, 2026 |
| Links: | GitHub · Packagist |
Maintainer: TomasVotruba
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
- Can Vural - this package is based on that, with upgrade for Laravel 10 and active maintenance
- All Contributors
Related Packages
larastan/larastan
Larastan - Discover bugs in your code without running it. A phpstan/phpstan exte...
60,994,572
6,472
prettyyellowdog/lumenstan
Lumenstan - Discover bugs in your code without running it. A phpstan/phpstan wra...
175
0
guanguans/php-cs-fixer-custom-fixers
Use php-cs-fixer to format bats,blade.php,Dockerfile,env,json,md,mdx,sh,sql,tex,...
7,619
4
mfn/phpstan-lost-in-translation
Helps find missing translation strings in Laravel applications
3,593
1