chrisdev / symfony-quality-cockpit
A reusable Symfony quality cockpit for PHPUnit, Infection, PhpMetrics, Deptrac and Composer Audit reports.
Package info
github.com/Cbruyere/symfony-quality-cockpit
Type:symfony-bundle
pkg:composer/chrisdev/symfony-quality-cockpit
Requires
- php: >=8.4
- chrisdev/ux-components: ^1.0
- symfony/config: ^7.4|^8.0
- symfony/dependency-injection: ^7.4|^8.0
- symfony/framework-bundle: ^7.4|^8.0
- symfony/http-foundation: ^7.4|^8.0
- symfony/routing: ^7.4|^8.0
- symfony/stimulus-bundle: ^3.0
- symfony/translation: ^7.4|^8.0
- symfony/twig-bundle: ^7.4|^8.0
- symfony/ux-icons: ^3.1
- symfony/ux-twig-component: ^3.1
- symfony/yaml: ^7.4|^8.0
- twig/twig: ^3.21
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.0
- symfony/browser-kit: ^7.4|^8.0
- symfony/css-selector: ^7.4|^8.0
- symfony/phpunit-bridge: ^7.4|^8.0
- symfony/web-profiler-bundle: ^7.4|^8.0
README
Reusable Symfony bundle for presenting PHPUnit, Infection, PhpMetrics, Deptrac and Composer Audit reports in one development dashboard.
Status
The package is being extracted from the Repair Workshop prototype. The extraction audit and target architecture are documented in the source project before application code is ported.
Installation
composer require --dev chrisdev/symfony-quality-cockpit
Register the bundle when Symfony Flex is not configured for the package:
Chrisdev\QualityCockpit\QualityCockpitBundle::class => ['dev' => true, 'test' => true],
Import the routes:
quality_cockpit: resource: '@QualityCockpitBundle/config/routes.php'
Configure the report root:
quality_cockpit: reports: base_directory: '%kernel.project_dir%/var/reports'
Compatibility currently follows the extracted source environment: PHP 8.4 and Symfony 7.4 or 8.0. The Symfony 7.4 path remains to be verified in CI before it is advertised as supported.
Frontend integration
The bundle ships Tailwind classes in its Twig templates and Stimulus controllers for the tabs and Infection filters. With Tailwind CLI and a custom JavaScript entrypoint, add the bundle templates to the host scan and register its controllers:
@source "../../vendor/chrisdev/symfony-quality-cockpit/templates/**/*.twig";
import QualityTabsController from '../vendor/chrisdev/symfony-quality-cockpit/assets/controllers/quality_tabs_controller.js'; import InfectionFiltersController from '../vendor/chrisdev/symfony-quality-cockpit/assets/controllers/infection_filters_controller.js'; app.register('quality-tabs', QualityTabsController); app.register('infection-filters', InfectionFiltersController);