devrabiul / laravel-php-inspector
A Laravel package to inspect PHP code for version compatibility using PHPCompatibility and PHP_CodeSniffer.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/devrabiul/laravel-php-inspector
Requires
- php: >=8.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.1
- phpcompatibility/php-compatibility: ^9.3
- phpcsstandards/php_codesniffer: ^4.0
README
LaravelPhpInspector is a developer tool for Laravel that helps you check your projectβs PHP 8.4 and Laravel 12 compatibility.
It uses PHP_CodeSniffer and the PHPCompatibility ruleset under the hood to scan your code and highlight deprecated functions, syntax issues, and Laravel helper changes.
π Live Demo
π Try the Live Demo
β¨ Features
- β Detects deprecated PHP functions, classes, and syntax
- β Highlights Laravel helpers and validation rules that need updating
- β Compatible with PHP 8.4
- β Works with Laravel 10, 11, and 12
- β
Excludes
vendor/
,node_modules/
, and public assets by default - β Provides Artisan command for easy inspection
π¦ Installation
Install the package via Composer:
composer require devrabiul/laravel-php-inspector --dev
Then publish the package config:
php artisan vendor:publish --provider="Devrabiul\LaravelPhpInspector\LaravelPhpInspectorServiceProvider"
βοΈ Usage
Run the inspector to check your Laravel app for PHP compatibility:
php artisan phpinspector-compat:check
Available Options
-
--php=
β Target PHP version (overrides config) Example:php artisan phpinspector-compat:check --php=8.4
-
--path=
β Specific path to scan (overrides config) Example:php artisan phpinspector-compat:check --path=app/Models
By default, the command scans your entire Laravel project (excluding vendor/
, storage/
, and *.blade.php
files).
π― Get Started Today!
Experience the magic of LaravelPhpInspector and enrich your Laravel application with modern PHP compatibility checks.
- π GitHub: devrabiul/laravel-php-inspector
- π Live Demo: laravel-php-inspector.rixetbd.com
- π Packagist: packagist.org/packages/devrabiul/laravel-php-inspector
π€ Contributing
We welcome contributions! Please fork the repository, make your changes, and submit a pull request. For feature requests or issues, open a GitHub issue.
π License
This package is open-source software licensed under the MIT license.
π± Treeware
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest youβll be creating employment for local families and restoring wildlife habitats.
π¬ Contact
For support or inquiries, feel free to reach out: π§ devrabiul@gmail.com