tomasvotruba/bladestan
Bladestan adds PHPStan-powered static analysis for Laravel Blade templates. Install as a dev dependency and include its extension if needed. Provides a custom “blade” error formatter showing clickable template paths and where errors are rendered.
@foreach($dynamicData as $item)), which may trigger false positives. Mitigation: Configure phpstan.neon to ignore known edge cases or suppress specific rules.@stack) may not be fully analyzed. Risk is low given the package’s active maintenance and recent Livewire 4.0 support.view.paths or custom paths may require manual adjustments in extension.neon.phpstan analyze with Bladestan enabled. Cache invalidation (per PR #174) may require tuning.@phpstan-ignore-next-line)? Document a process to avoid "ignoring" critical issues.phpstan.neon).composer show phpstan/phpstan).composer.json).composer require --dev tomasvotruba/bladestan
vendor/bin/phpstan extension:install tomasvotruba/bladestan
phpstan.neon:
includes:
- ./vendor/tomasvotruba/bladestan/config/extension.neon
phpstan.neon:
services:
- Bladestan\BladeRuleSetLevel
vendor/bin/phpstan analyze --error-format=blade
.github/workflows/ci.yml):
- name: Run Bladestan
run: vendor/bin/phpstan analyze --level=max --error-format=blade
vendor/bin/phpstan --version.@extends, @include, @includeIf, @foreach, @component, etc.View::make(), Response::view().content()).view()->first()).@php or @verbatim directives./resources/views/auth).phpstan.neon or suppress rules as needed.feature/bladestan).composer.json to avoid breaking changes:
"require-dev": {
"tomasvotruba/bladestan": "^0.11"
}
phpstan.neon or suppress rules (e.g., phpstan-ignore-line).view.paths in config/view.php is correct.--debug flag for verbose output:
vendor/bin/phpstan analyze --debug --error-format=blade
--generate-baseline to ignore existing issues during initial adoption.How can I help you explore Laravel packages today?