gboquizosanchez / phpstan-report
Laravel package to display PHPStan errors in a view
Package info
github.com/gboquizosanchez/phpstan-report
Language:Blade
pkg:composer/gboquizosanchez/phpstan-report
Requires
- php: ^8.3
- illuminate/console: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
- illuminate/view: ^11.0|^12.0
- phpstan/phpstan: ^1.0|^2.0
Requires (Dev)
- laravel/pint: ^1.24
README
gboquizosanchez/phpstan-report
A beautiful web interface for PHPStan results in Laravel
Stop squinting at terminal output. Run PHPStan, browse results, fix errors β all from your browser.
Overview
PHPStan Report is a Laravel package that provides an elegant web interface for viewing, analyzing, and managing PHPStan static analysis results. Transform your code quality insights into an interactive, user-friendly dashboard.
β¨ Features
- π― Dynamic Level Control β Adjust PHPStan analysis levels (1β10) from the UI
- β‘ Real-time Analysis β Run PHPStan directly from your browser
- π Beautiful Reports β Errors grouped by file, expandable inline, with severity indicators
- π Dark / Light theme β Persisted per session
- π One-click copy β Copy error messages and suggested fixes instantly
- π± Responsive β Optimized for mobile and desktop
- π Composer integration β Seamless integration with Composer scripts
- πΎ Auto-save β Remembers your preferred configuration
Requirements
- PHP 8.3+
- Laravel 11.0+ or 12.0+
Warning
This package is intended for development environments only. Do not install it in production.
π¦ Installation
composer require gboquizosanchez/phpstan-report
Run the installation command to automatically configure everything:
php artisan install:phpstan-report
This command will:
- Create
phpstan.neonβ Generates a base config at level 3 (if not already present) - Publish assets β Copies assets to
public/vendor/phpstan-report - Update
composer.jsonβ Adds aphpstan-reportComposer script - Run initial analysis β Executes PHPStan and discovers your codebase
Generated phpstan.neon
parameters: level: 3 paths: - app
You can customize this file to match your project's needs.
π Usage
Navigate to the dashboard in your browser:
https://your-application.com/phpstan-report
Or verify the route is registered:
php artisan route:list --name=phpstan
You can also trigger analysis from the command line:
composer phpstan-report
Dashboard features
Analysis overview β Real-time stats showing total errors, warnings, and current analysis status.
Level management β Interactive slider to adjust PHPStan levels (1β10) with instant feedback and automatic re-analysis on change.
Error browser β File-based organization with expandable error lists, color-coded severity, and one-click copy for quick sharing.
Theme & preferences β Toggle between dark and light mode; settings persist across sessions.
Troubleshooting
- Check the logs β Laravel logs may contain helpful error messages.
- Verify requirements β Ensure PHP and Laravel versions meet the minimum requirements.
- Clear cache β Run
php artisan config:clearandphp artisan cache:clear. - Open an issue β Report bugs or request features.
Contributing
Contributions are welcome!
- π Report bugs via GitHub Issues
- π‘ Suggest features or improvements
- π§ Submit pull requests with fixes or enhancements
- π Improve documentation or add examples
Credits
- Author: GermΓ‘n Boquizo SΓ‘nchez
- Built with: PHPStan Β· Laravel Β· Alpine.js Β· Tailwind CSS
- Contributors: View all contributors
π License
This package is open-source software licensed under the MIT License.
Made with β€οΈ for the PHP community
