phpstan/phpstan-shim
Deprecated shim for PHPStan. Since PHPStan 0.12, the main phpstan/phpstan package ships as a PHAR, making phpstan/phpstan-shim unnecessary. Upgrade by switching composer dependency to phpstan/phpstan ^0.12 and reinstalling.
phpstan/phpstan-shim package is completely deprecated per the 0.12.0 release notes, which explicitly state it is no longer needed due to PHPStan’s shift to a PHAR-based distribution. This renders the package irrelevant for any Laravel project using PHPStan 0.12+ or modern Composer workflows.phpstan/phpstan:^0.12 or later.phpstan/phpstan + laravel-shift/phpstan-rules provide:
nunomaduro/phpstan-laravel).vendor/ dependency hell entirely.composer.json scripts).vendor/bin/phpstan may break:
phpstan-shim.phpstan/phpstan:^0.12 with the Laravel version in use? If not, what’s the blocker?phpstan-shim? Example risks:
phpstan-shim → phpstan/phpstan:0.12.before_script: composer install with PHAR-specific steps.phpstan/phpstan?laravel-shift/phpstan-rules been evaluated as a drop-in replacement?phpstan/phpstan:^1.0 (recommended) or ^0.12 (minimum).vendor/ pollution; integrates with Composer’s bin-dir.composer require --dev laravel-shift/phpstan-rules nunomaduro/phpstan-laravel
phpstan/phpstan:0.12.99 with:
composer require phpstan/phpstan:0.12.99 --ignore-platform-reqs
Audit Current Usage:
grep -r "phpstan-shim" . || find . -name "*phpstan-shim*"
vendor/bin/phpstan-shim.Replace with PHAR:
composer.json:
- "phpstan/phpstan-shim": "^0.10"
+ "phpstan/phpstan": "^0.12"
rm -rf vendor/phpstan vendor/bin/phpstan vendor/bin/phpstan.phar
composer install
vendor/bin/phpstan --version
Laravel-Specific Setup:
phpstan.neon:
includes:
- app/
- config/
- routes/
- tests/
level: max
extends:
- phpstan/laravel.neon
- vendor/laravel-shift/phpstan-rules/laravel-shift.neon
composer.json scripts:
"scripts": {
"phpstan": "vendor/bin/phpstan analyse --level=max"
}
CI/CD Update:
- name: PHPStan
run: composer run phpstan
phpstan:
script: composer run phpstan
vendor/ dependencies. Ensure no scripts hardcode vendor/bin/phpstan-shim.composer run phpstan or ./vendor/bin/phpstan (PHAR is symlinked).laravel-shift/phpstan-rules: Works with PHPStan 0.12+.nunomaduro/phpstan-laravel: Blade template analysis (PHPStan 1.0+).composer why-not to detect conflicts:
composer why-not phpstan/phpstan:^1.0
composer.lock and vendor/.composer require phpstan/phpstan:0.12.0 --dev --ignore-platform-reqs
vendor/bin/phpstan analyse --level=5
composer.json → composer update phpstan/phpstan --with-all-dependencies.composer run phpstan --generate-baseline to adapt to new rules.composer.json.composer require phpstan/phpstan:^1.0 --dev
composer require laravel-shift/phpstan-rules --dev
phpstan.neon as Laravel evolves (e.g., add app/Console/Kernel.php for Horizon).How can I help you explore Laravel packages today?