Product Decisions This Supports
- Unified Code Quality Pipeline: Consolidate disparate PHP static analysis tools (e.g., PHPStan, Psalm, PHPMD, PHP-CS-Fixer) into a single CLI command, reducing toolchain complexity and developer onboarding time.
- DevOps/CI/CD Efficiency: Replace fragmented CI configurations (e.g., Jenkinsfiles,
.travis.yml, Scrutinizer) with a lightweight, self-contained tool that runs in one step, cutting build times and maintenance overhead.
- Symfony/Bundle-Specific Analysis: Enable granular analysis of individual Symfony bundles or microservices without requiring per-bundle CI setups (e.g., "Run PHPQA only on the
UserBundle").
- Self-Service Quality Checks: Empower developers to run ad-hoc code quality scans locally (e.g.,
phpqa ./src/User) without relying on CI, reducing feedback loops.
- Reporting Standardization: Generate consistent HTML/CLI reports across teams, improving visibility into code health trends (e.g., for pre-release audits or tech debt tracking).
- Legacy System Modernization: Migrate older PHP projects (5.4+) to modern tooling without rewrites, by wrapping legacy analyzers in a unified interface.
When to Consider This Package
Adopt if:
- Your team uses multiple PHP static analysis tools (e.g., PHPStan + Psalm + PHPMD) and wants to simplify invocation.
- You’re fatigued by CI configuration sprawl (e.g., maintaining separate Jenkins tasks or
.scrutinizer.yml files for different codebases).
- You need ad-hoc, directory-level analysis (e.g., "Check this new feature branch before merging").
- Your project is Symfony-based and you want to analyze bundles independently without full-project scans.
- You prioritize developer experience over fine-grained customization (e.g., you’re okay with default configurations for most use cases).
- Your team lacks dedicated QA engineers to manage tooling, but still needs consistent code quality gates.
Look elsewhere if:
- You require deep customization of individual analyzers (e.g., bespoke PHPStan rules or Psalm configurations).
- Your project uses PHP < 5.4 or relies on unsupported extensions (e.g.,
xsl for HTML reports).
- You need enterprise-grade reporting (e.g., integration with Jira, Slack, or custom dashboards) beyond HTML/CLI outputs.
- Your team already has a mature, tailored toolchain (e.g., custom scripts or a dedicated QA platform like SonarQube).
- You’re in a high-security environment where MIT-licensed tools require internal vetting (though this is a low-risk package).
How to Pitch It (Stakeholders)
For Executives:
"This package unifies PHP code quality analysis into a single command, cutting our CI/CD complexity by 40%+ and reducing developer friction. Instead of managing 5+ tools with conflicting configs, teams can run phpqa ./src to catch issues early—locally or in CI—without extra setup. For Symfony projects, it lets us analyze bundles independently, speeding up feature delivery. The MIT license and active maintenance make it a low-risk, high-reward upgrade to our toolchain."
For Engineering Leaders:
*"PHPQA solves our ‘toolchain sprawl’ problem by wrapping PHPStan, Psalm, PHPMD, and CS Fixer into one CLI. Key wins:
- Faster onboarding: New devs run one command instead of configuring 4 tools.
- CI simplification: Replace 3+ Jenkins tasks with a single step (
phpqa .).
- Granular scans: Analyze specific directories (e.g.,
phpqa ./src/User) without full-project overhead.
- Consistent reports: HTML/CLI outputs standardize how we track code health.
We can phase this in alongside our existing tools, then sunset the old configs over 3–6 months. The trade-off is minor customization flexibility, but the productivity gains outweigh it."*
For Developers:
*"Tired of running phpstan analyze --level=5 and phpmd text src and php-cs-fixer fix? PHPQA does it all in one command:
phpqa ./src # Runs PHPStan, Psalm, PHPMD, and CS Fixer
phpqa --html ./src # Generates a report in one click
No more YAML files or CI voodoo—just point it at your code and go. Works great for local checks before PRs, too."*