phpcq/repository-definition
Repository definition package for the PHPCQ (PHP Code Quality) project, used to automate and configure code quality checks in CI pipelines. Part of the phpcq.org ecosystem built around tools like PHP_CodeSniffer and PHPMD.
PhpcqServiceProvider).php artisan phpcq:check).laravel-pint, phpstan, or pestphp if not carefully scoped (e.g., PHPCQ for static analysis, Laravel tools for formatting/testing).App\Services\ namespace).phpcq:run).repo:clone or pr:opened.phpcq/laravel package) for tight integration.blade_sniffs).phpstan for type checking).| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Tooling Fragmentation | PHPCQ may duplicate or conflict with phpstan, pint, or psalm. |
Scope PHPCQ to static analysis only; use Laravel tools for other concerns. |
| Schema Inflexibility | Rigid schema may not accommodate Laravel’s dynamic features (e.g., facades). | Extend the schema via custom fields or a laravel-extensions module. |
| Performance Overhead | Running PHPCQ in CI/CD could slow pipelines. | Cache results, parallelize checks, or use selective validation (e.g., changed files only). |
| Maintenance Burden | Package is unmaintained (0 stars, no dependents). | Fork and maintain or propose upstream changes to PHPCQ core team. |
| Learning Curve | Team may lack familiarity with PHPCQ’s tooling. | Provide Laravel-specific docs and examples (e.g., phpcq.yml templates). |
| CI/CD Complexity | Integrating PHPCQ into existing workflows may require refactoring. | Pilot in one repo first, then standardize. |
phpstan, pint) sufficient?nunomaduro/collision) achieve similar goals with less friction?phpstan/pint without redundancy?spatie/fork or symfony/yaml for parsing.phpcq:check) can be built.phpcq/laravel package).phpstan, pint, or psalm if not scoped.Phase 1: Discovery (2 weeks)
phpcq.yml for one repository and test locally.
repositories:
- path: .
tools:
- phpcs
- phpmd
rules:
- "PSR12"
- "NoHardcodedConfigs"
Phase 2: Pilot (4 weeks)
phpcq.yml template for the team.Phase 3: Standardization (6 weeks)
phpcq/laravel package to:
php artisan phpcq:check).repo:clone).Phase 4: Optimization (Ongoing)
blade_sniffs, eloquent_rules).| Component | Compatibility Level | Notes |
|---|---|---|
| Laravel 10/11 |
How can I help you explore Laravel packages today?