etsglobal/php-static-analysis
A PHP static analysis package from ETS Global for inspecting PHP codebases and supporting code quality workflows. Integrates into Laravel/PHP projects to help surface potential issues, encourage cleaner code, and complement existing test and CI pipelines with additional static checks.
Architecture fit
require-dev-only artifact: it configures tooling (almost certainly PHPStan/Psalm/PHP-CS-Fixer-style presets) rather than shipping runtime code. Architectural coupling to the Laravel application is effectively zero, which is the one unambiguous positive.phpstan.neon.dist, a .php-cs-fixer.dist.php, and a few CI steps committed directly into the repo. That reframes the buy-vs-build question: we are evaluating whether to outsource lint policy to a third party, not whether to adopt a technology.Integration feasibility
phpstan/phpstan or php-cs-fixer to a specific major will block our own tooling upgrades, including security patches. PHPStan's 1.x → 2.x config surface changed materially, and presets authored against the older shape will not transfer cleanly.includes:, upstream changes to rules land in our CI without a corresponding change in our repo — the opposite of the auditability we want from a quality gate.Key questions (gate these before any pilot)
phpstan.neon.dist non-trivial?Stack fit
require, never affect autoloading, and never be present in production images. If the package's own composer.json does not cleanly separate dev concerns, that is disqualifying.Recommended migration path — vendor the opinions, not the package
composer require --dev dependency if the package ships logic we cannot replicate — e.g., custom rules, a ruleset generator, or maintained stub libraries. Config-only means copy.Compatibility
Sequencing
phpstan-baseline.neon. On any non-trivial Laravel codebase this will contain hundreds of entries; that is expected and is not a reason to lower the level.Maintenance
Support
Scaling
tmpDir persisted in CI), --memory-limit tuning, and parallel workers. On large Laravel monorepos, expect multi-minute runs and consider path-scoped analysis on PRs with full runs nightly.Failure modes (ranked by likelihood × impact)
composer.lock pinning plus diff-on-update.Ramp-up
Recommendation
larastan + a standard phpstan.neon.dist and skip the package entirely.How can I help you explore Laravel packages today?