- Can I use lookyman/phpstan-symfony with Laravel 8/9 or Symfony 6/7?
- No, this package is deprecated and only supports Symfony 2/3/4 and PHPStan 0.x. Modern Laravel/Symfony apps use PHPStan’s built-in Symfony extension or phpstan/extension-installer, which handle Symfony 5+/6+ and PHPStan 1.x natively.
- How do I install this package in a Laravel project?
- You can’t install it via Composer directly—it’s deprecated. If you’re on Symfony 3/4, manually add `lookyman/phpstan-symfony` to `composer.json` and lock PHPStan to `^0.12`, but expect conflicts with Laravel’s modern dependencies. For Laravel 8+, use `phpstan/extension-installer` instead.
- Will this package work with PHP 8.0+?
- No, it targets PHP 5.6–7.2. PHP 8.0+ introduces strict typing and deprecated function removals that will break this package. Modern PHPStan extensions (like `phpstan/symfony`) support PHP 8.x.
- What are the risks of using this outdated package?
- Critical risks include security vulnerabilities (unpatched dependencies), silent failures with Symfony 5+/6+, and conflicts with Laravel’s autoloader or modern PHPStan rules. It may also break during minor Symfony/PHP updates.
- Is there a migration path from this package to modern PHPStan?
- Yes, but it requires replacing `lookyman/phpstan-symfony` with `phpstan/extension-installer` and configuring `phpstan/symfony` (native extension). Start by running `phpstan upgrade` and gradually replacing custom rules with the new extension’s features.
- Does this package support Symfony’s new attributes (PHP 8) or Messenger component?
- No, it was built for Symfony 2/3/4 and lacks support for attributes, Messenger, or other Symfony 5+/6+ features. Modern PHPStan extensions cover these cases.
- How do I configure PHPStan to avoid conflicts with this package?
- Disable Symfony’s built-in PHPStan integration in `phpstan.neon` and explicitly configure `lookyman/phpstan-symfony` for legacy analysis. However, this is fragile—modern setups use `extensions:` in PHPStan’s config instead.
- Are there alternatives for Symfony 3/4 projects?
- For Symfony 3/4, consider forking this package (high effort) or manually writing PHPStan rules. For Symfony 5+, use `phpstan/symfony` (native extension) or `phpstan/doctrine` for Doctrine-specific analysis.
- Will this package work with Laravel’s service container or bundles?
- It may work partially for Symfony 3/4, but Laravel’s container and bundles (e.g., `laravel/framework`) rely on modern Symfony features this package ignores. Test thoroughly—expect breakage with Laravel 8+.
- How do I test if this package is safe for my legacy project?
- Run it in a staging environment with `--level=max` and log all errors. Compare results with `phpstan/symfony` (native) to identify gaps. If it fails, disable it and implement custom PHPStan rules for your Symfony 3/4 patterns.