This guide covers the local development workflow for Le Rocher Académie.
The project uses Docker for a consistent development environment across all platforms.
# Start all services
docker compose up -d
# Watch Tailwind CSS changes
docker compose exec php bin/console tailwind:build --watch
# Watch logs
docker compose logs -f php# Clear cache
docker compose exec php bin/console cache:clear
# Create a new migration
docker compose exec php bin/console make:migration
# Run migrations
docker compose exec php bin/console doctrine:migrations:migrate
# Load fixtures
docker compose exec php bin/console doctrine:fixtures:load
# Create a new controller
docker compose exec php bin/console make:controller
# Create a new entity
docker compose exec php bin/console make:entity# Run all tests
docker compose exec php bin/phpunit
# Run specific test file
docker compose exec php bin/phpunit tests/SmokeTest.php
# Run with coverage
docker compose exec php bin/phpunit --coverage-html var/coverageWe follow PSR-12 coding standards. Use PHP-CS-Fixer:
# Check code style
docker compose exec php vendor/bin/php-cs-fixer fix --dry-run --diff
# Fix code style
docker compose exec php vendor/bin/php-cs-fixer fix# Generate migration from entity changes
docker compose exec php bin/console make:migration
# Execute migrations
docker compose exec php bin/console doctrine:migrations:migrateFixtures provide sample data for development:
# Load all fixtures (WARNING: purges database)
docker compose exec php bin/console doctrine:fixtures:load
# Append fixtures without purging
docker compose exec php bin/console doctrine:fixtures:load --appendXDebug is pre-configured. Enable it:
XDEBUG_MODE=debug docker compose up -dConfigure your IDE to listen on port 9003.
Access the profiler toolbar at the bottom of each page in dev mode.
View detailed profiler data:
http://localhost:8095/_profiler
# View SQL queries
docker compose exec database psql -U app -d app
# Run custom SQL
docker compose exec php bin/console dbal:run-sql "SELECT * FROM user LIMIT 10"- Create feature branch
- Write tests first (TDD)
- Implement feature
- Update documentation
- Run tests and fix issues
- Submit pull request
# Update Composer dependencies
docker compose exec php composer update
# Update npm packages (if needed)
docker compose exec php npm updatedocker compose exec php bin/console cache:warmup# Analyze database performance
docker compose exec database psql -U app -d app -c "VACUUM ANALYZE"See Troubleshooting Guide for common development issues.
- Review Architecture Overview
- Learn about Testing Strategy
- Explore Features