Prerequisites
Before you begin, make sure you have the following installed:- Docker and Docker Compose (recommended path)
- PHP 8.1+ and Composer (required for the non-Docker path)
- pnpm (for building frontend assets)
Setup
- With Docker (recommended)
- Without Docker
Available Make targets
All targets run commands inside the Docker container. The container starts automatically if it isn’t running.| Target | Description |
|---|---|
make up | Build and start the container |
make down | Stop and remove the container |
make shell | Open an interactive shell in the container |
make install | Install Composer and pnpm dependencies |
make test | Run all PHPUnit tests (unit + integration) |
make test-coverage | Run tests with code coverage report |
make qa | Run all QA checks (code style + tests) |
make assets | Install pnpm deps and build frontend assets |
make cs-check | Check code style with PHP-CS-Fixer |
make cs-fix | Auto-fix code style with PHP-CS-Fixer |
make phpstan | Run PHPStan static analysis |
make rector | Apply Rector refactoring |
make rector-dry | Run Rector in dry-run mode |
Composer scripts
These scripts run directly withcomposer inside the container (or locally without Docker):
| Script | Description |
|---|---|
composer test | Run all PHPUnit tests |
composer test-coverage | Run tests with code coverage |
composer cs-check | Check code style |
composer cs-fix | Auto-fix code style |
composer phpstan | Run static analysis |
composer rector | Apply Rector refactoring |
composer qa | Run all quality checks |
Running tests
The bundle has 150+ tests targeting 90%+ code coverage. CI runs the full matrix across PHP 8.1–8.5 and Symfony 6.4, 7.0, 8.0.Test structure
Code quality tools
The bundle uses three tools to maintain code quality:- PHP-CS-Fixer — enforces PSR-12 code style (config:
.php-cs-fixer.dist.php) - PHPStan — static analysis
- Rector — automated refactoring
Building frontend assets
The bundle ships TypeScript and SCSS assets compiled with Vite.- With Docker
- Locally
Asset locations
| Path | Purpose |
|---|---|
src/Resources/assets/src/*.ts | TypeScript source — compiled by Vite |
src/Resources/views/assets/dist/ | Build output — used by the collector Twig template |
src/Resources/public/assets/ | Distributable assets — copied to host project with assets:install |
src/Resources/views/assets/dist/:
index.min.js— bundled TypeScript (IIFE)style.min.css— compiled SCSS
CI/CD
GitHub Actions run on every push and pull request:- Tests — PHP 8.1–8.5 × Symfony 6.4, 7.0, 8.0 matrix
- Code style — PHP-CS-Fixer; auto-fix on push to
main/master - Coverage — 90% minimum enforced in CI
- Assets — TypeScript and SCSS build verified
- Dependabot — automated dependency update PRs
