Download the PHP package aazbeltran/laravel-backpack-phpstan-extension without Composer
On this page you can find all versions of the php package aazbeltran/laravel-backpack-phpstan-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aazbeltran/laravel-backpack-phpstan-extension
More information about aazbeltran/laravel-backpack-phpstan-extension
Files in aazbeltran/laravel-backpack-phpstan-extension
Package laravel-backpack-phpstan-extension
Short Description PHPStan extension for Laravel Backpack - Adds static analysis support for Backpack CRUD, Basset, and other Backpack components
License MIT
Informations about the package laravel-backpack-phpstan-extension
โจ Features
๐ฎ Magic Method Resolution - Automatically resolves dynamic methods on CrudField and CrudColumn classes
โ๏ธ Fluent Interface Support - Maintains proper return types for seamless method chaining
๐ Pro Package Ready - Full compatibility with Backpack Pro operations and advanced features
๐๏ธ Laravel Facades - Complete type hints for Laravel facades used throughout Backpack
๐ Comprehensive Stubs - Type definitions for all major Backpack classes and components
๐ Zero Configuration - Works out of the box with sensible defaults
๐ Quick Start
Installation
Configuration
Add to your phpstan.neon:
Run Analysis
That's it! ๐ Your Backpack code is now statically analyzed.
๐ Usage Examples
Before: PHPStan Errors โ
After: Clean Analysis โ
Pro Package Support
๐ฏ Supported Components
Core CRUD Features
- โ **CrudPanel** - Main panel operations and configuration - โ **CrudField** - Field definitions with fluent interface - โ **CrudColumn** - Column definitions with fluent interface - โ **CrudFilter** - Filter definitions and logic - โ **CrudButton** - Button definitions and positioning - โ **Widget** - Dashboard and page widgets - โ **CrudController** - Base controller functionality - โ **CrudPanelFacade** - Static facade accessPro Package Features
- โ **CloneOperation** - Entity cloning functionality - โ **FetchOperation** - AJAX data fetching - โ **InlineCreateOperation** - Inline entity creation - โ **ChartController** - Dashboard charts and analytics - โ **Pro Fields** - Advanced field types - โ **Pro Widgets** - Enhanced widget componentsLaravel Integration
- โ **Facades** - Route, Auth, Request, Schema, etc. - โ **Eloquent Models** - Enhanced model typing - โ **Request/Response** - HTTP layer improvements - โ **Validation** - Custom rule definitionsโ ๏ธ Version Compatibility
Important Notice: This extension was developed and tested against specific versions of Laravel Backpack packages. Compatibility with other versions is not guaranteed.
Tested Versions
- Laravel Backpack CRUD:
^6.0 - Laravel Backpack Pro:
^2.0(optional) - Laravel:
^10.0|^11.0 - PHP:
^8.1 - PHPStan:
^1.10|^2.0
Maintenance Notice
โ ๏ธ Limited Maintenance: Due to the lack of access to Backpack Pro licenses for all contributors, this extension has limited long-term maintenance plans. Community contributions are encouraged and appreciated.
For the most up-to-date compatibility information, please check our compatibility matrix.
๐งช Testing
Run the test suite:
Run PHPStan analysis on the extension itself:
Run code style fixes:
๐ Error Reduction Results
Based on real-world testing with Laravel Backpack codebases:
- Before: 655+ PHPStan errors
- After: 98 errors resolved (15% improvement)
- Key fixes: Magic methods, property access, Pro compatibility
๐ง Advanced Configuration
Custom Stub Paths
Selective Feature Enabling
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
Quick Development Setup
For AI agents and automated tools, see AGENTS.md for detailed development instructions.
๐ Documentation
- Installation Guide
- Configuration Options
- Troubleshooting
- Compatibility Matrix
- API Reference
๐ Support
- ๐ Documentation: https://github.com/aazbeltran/laravel-backpack-phpstan-extension/docs
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ก Feature Requests: Feature Request Template
๐ License
This package is open-sourced software licensed under the MIT license.
๐ Credits
- Laravel Backpack Team - For creating an amazing admin panel package
- PHPStan Team - For providing excellent static analysis tools
- Community Contributors - For reporting issues and suggesting improvements
Supported Classes
CrudPanel- Main CRUD panel functionalityCrudField- Form field configurationCrudColumn- Column configuration for list viewsCrudFilter- Filter configurationCrudController- Base CRUD controllerWidget- Widget system- Facades (CRUD facade support)
Error Reduction
This extension helps eliminate common PHPStan errors when working with Laravel Backpack:
Before (with errors):
After (no errors):
Development
Running Tests
Running PHPStan Analysis
Requirements
- PHP 8.1+
- PHPStan ^1.10 or ^2.0
- Laravel Backpack CRUD ^6.0
Supported Backpack Packages
- Backpack CRUD ^6.0
- Backpack Basset ^1.0
- Backpack Pro (optional)
License
MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Changelog
See CHANGELOG.md for release history.