contributte/phpstan
Contributte PHPStan integration for Nette projects. Install via Composer and get a ready-to-use PHPStan setup tailored for Nette 3.3+ on PHP 8.2+, with docs and ongoing maintenance by the Contributte team.
pint, php-cs-fixer) by focusing on type safety and code quality rather than formatting.phpstan.neon, allowing alignment with Laravel’s conventions (e.g., dynamic properties, magic methods).includes in phpstan.neon) without modifying Laravel’s core or third-party packages, reducing risk.__get(), __callStatic()).@phpstan-ignore).phpstan/extension-installer + custom rules)?@phpstan-ignore) will be needed to avoid developer frustration?pint (formatting), php-cs-fixer, pest (testing), laravel-telescope (debugging).phpstan analyse in GitHub Actions or GitLab CI).phpstan.neon) for conflicts or overlaps.contributte/phpstan to composer.json under require-dev:
composer require --dev contributte/phpstan
phpstan.neon to include Contributte’s rules:
includes:
- vendor/contributte/phpstan/extension.neon
--level=5 (strict) in CI but enable rules incrementally via phpstan.neon:
extends:
- phpstan/recommended
- contributte/phpstan/level5.neon
DeprecatedFunctionRule), then stricter ones (e.g., TypeMismatchRule).phpstan analyse locally and in CI to identify issues.phpstan.neon:
excludes:
- app/OldLegacyCode/
// @phpstan-ignore-next-line
$result = $this->dynamicMethod();
phpstan/phpstan:^1.0) to avoid breaking changes.phpstan diagnose to detect configuration overlaps and resolve them via excludes or includeRules.phpstan.neon and CI configurations.phpstan.neon to update rules or exclusions.phpstan.neon to ensure rules remain relevant as Laravel or PHPStan evolves.phpstan.neon extension for Laravel:
extends:
- contributte/phpstan/level5.neon
- vendor/your-team/laravel-phpstan-rules.neon
@phpstan-ignore, @var).phpstan analyse --parallel
excludes in phpstan.neon to phase out legacy code:
excludes:
- app/Legacy/
/app/Http/Controllers/).How can I help you explore Laravel packages today?