tomasvotruba/bladestan
Bladestan adds static analysis for Laravel Blade templates to PHPStan, catching errors like undefined methods in your views. Includes a custom error formatter with clickable links to the exact template line.
Release reviewed: Bladestan 0.11.8 is a patch release with bug fixes only. No breaking changes, deprecations, new configuration requirements, or migration steps were identified. The release improves reliability in Livewire/Blade parsing edge cases and import handling, so it warrants a minor assessment refresh but not a change in adoption strategy.
0.11.8 fixes specifically improve Livewire attribute parsing and Blade import handling.0.11.8 does not change cache behavior but reduces parser-level false results.0.11.8 fixes:
use function import bubble-up.@include($dynamicPartial) can still trigger false positives. Livewire attribute parsing risk is modestly reduced by 0.11.8, but complex Livewire components should remain a pilot validation target.@php blocks, custom directives, and runtime-generated view data may not be fully analyzable. Risk is low for typical Blade usage but remains for highly dynamic templates.--error-format=blade output may not be natively parsed by all IDE plugins. CLI usage or PHPStan-native output remains the safer default.0.11.8 appears low risk because it is patch-level and bug-fix oriented. Teams pinned to ^0.11 can adopt it through normal dependency updates.@php blocks?0.11.8 fixes?undefinedMethod, be ignored for selected classes or directories?^0.11 and updated through normal patch/minor review?phpstan.neon:
includes:
- ./vendor/tomasvotruba/bladestan/config/extension.neon
phpstan-blade.neon.0.11.8 improves Livewire attribute handling, which strengthens stack fit for Livewire-heavy applications.vendor/bin/phpstan analyze --memory-limit=1G --parallel
composer require --dev tomasvotruba/bladestan
vendor/bin/phpstan analyze --error-format=blade --level=5
level or ignoreErrors.require-dev:
"require-dev": {
"tomasvotruba/bladestan": "^0.11"
}
- name: Blade Template Analysis
run: vendor/bin/phpstan analyze --error-format=blade --level=5
"scripts": {
"test:bladestan": "phpstan analyze --error-format=blade"
}
0.11.8 specifically improves Livewire attribute parsing and camelization behavior.paths / excludePaths:
excludePaths:
- vendor
- storage/framework/views
0.11.8 is patch-level and should be compatible with existing ^0.11 configuration.^0.11 and review patch/minor releases normally.0.11.8 is a low-risk patch. No configuration changes are required.0.11.8 should be adopted through routine dependency update review, with special attention to Livewire and import-related templates.--parallel and PHPStan caching for large codebases.ignoreErrors, and gradually promoting checks.0.11.8 fixes several known cases, but complex Livewire attributes should remain in regression testing.How can I help you explore Laravel packages today?