phpqa consolidates multiple PHP analyzers (e.g., PHP_CodeSniffer, PHPStan, Psalm, etc.) into a single CLI tool, reducing toolchain complexity. This aligns well with Laravel’s ecosystem, where developers often juggle multiple static analysis tools (e.g., phpstan, psalm, pint).app/Modules/*) without per-module CI/CD configurations.phpqa invocation.composer require edgedesign/phpqa).phpstan.neon/psalm.xml files by leveraging phpqa's --config flag to merge settings.php artisan phpqa:run) to standardize usage across teams.phpqa's explicit version pinning in its composer.json.phpqa supports modern PHP, older Laravel projects may need polyfills or forks.xsl extension.php artisan test --testdox-html). Requires clear documentation on when to use phpqa vs. native tools.phpstan extensions.phpqa replace or complement existing analyzers (e.g., phpstan:baseline, pint)?phpstan vs. phpcs) be resolved?phpqa vs. individual tools in CI? (Benchmark with Laravel’s monorepo structure.)phpqa?phpqa be enforced via composer.json scripts (e.g., scripts.lint)?phpqa's default analyzers?phpqa integrate with Laravel’s phpunit.xml or php-cs-fixer.dist.php configurations?phpqa step.
- name: Run PHPQA
run: vendor/bin/phpqa analyze --format=github --config=.phpqa.php
execute shell plugin to run phpqa with custom ignore patterns (e.g., ./vendor, ./storage).phpqa as an external tool for on-save analysis.PHP Intelephense extension to parse phpqa JSON output.composer.json scripts:
"scripts": {
"lint": "phpqa analyze --format=cli",
"lint:fix": "phpqa fix"
}
phpqa in parallel with existing tools to validate output parity.app/Http/Controllers).phpstan.neon to phpqa's YAML/JSON config:
# .phpqa.yaml
analyze:
directories: [app, config]
ignore:
- "app/Providers/AppServiceProvider.php" # Example override
tools:
phpstan:
level: 8
configuration: phpstan.neon
phpcs/phpmd with phpqa.phpstan/psalm via phpqa config.phpqa in a custom command:
// app/Console/Commands/RunPHPQA.php
public function handle() {
$exitCode = \Edgedesign\PHPQA\Application::run([
'command' => 'analyze',
'format' => 'cli',
'--config' => base_path('.phpqa.php'),
]);
exit($exitCode);
}
phpqa paths in Laravel’s app config.phpqa in phpunit.xml as an external tool for pre-test analysis:
<php>
<listenFor>beforeTestSuite</listenFor>
<command>vendor/bin/phpqa analyze --format=cli --exit-on-fail</command>
</php>
phpqa fix (if using pint/php-cs-fixer) before analyze.composer install → phpqa analyze → phpunit → deploy.phpqa in deployment hooks to validate production-like environments..phpqa.yaml) reduces maintenance overhead vs. per-tool configs.phpqa abstracts analyzer versioning. Update via composer update edgedesign/phpqa.phpqa's config validation.phpstan) after phpqa adoption.--debug flag. Logs can be directed to Laravel’s storage/logs/phpqa.log.phpqa --help for tool-specific options (e.g., phpstan:rules).phpqa in Laravel’s CONTRIBUTING.md alongside phpunit/pint.phpqa analyze app --format=html).phpqa's GitHub issues for support; escalate Laravel-specific bugs to the package maintainers.--jobs=N (if supported by underlying tools).cache:remember in a custom Artisan command.phpqa via composer.json scripts to ensure consistency.phpqa in pre-commit hooks (e.g., with husky) for local enforcement.phpqa vs. individual tools for Laravel’s monorepo structure (e.g., modules/*).| Failure Scenario | Mitigation |
|---|---|
phpqa command fails in CI |
Fallback to individual tools (e.g., phpstan) with a CI variable override. |
| False positives in Laravel code | Whitelist paths in .phpqa.yaml or extend phpstan rules. |
| XSL extension missing in CI | Use Docker images with xsl pre-installed (e.g., |
How can I help you explore Laravel packages today?