| name | symfony:bootstrap-check |
| description | Verify Symfony project configuration including .env, services.yaml, doctrine settings, and framework requirements |
Bootstrap Check
Verify your Symfony project is properly configured before starting development.
Essential Files Check
1. Environment Configuration
# Required files
.env # Base environment variables
.env.local # Local overrides (not committed)
.env.test # Test environment
# Check .env exists
ls -la .env*
2. Configuration Files
# Framework configuration
config/packages/framework.yaml
config/packages/doctrine.yaml
config/packages/security.yaml
config/services.yaml
# Routes
config/routes.yaml
config/routes/annotations.yaml # or attributes.yaml
3. Directory Structure
your-project/
├── bin/
│ └── console
├── config/
│ ├── packages/
│ ├── routes/
│ └── services.yaml
├── public/
│ └── index.php
├── src/
│ ├── Controller/
│ ├── Entity/
│ └── Kernel.php
├── var/
│ ├── cache/
│ └── log/
├── vendor/
├── composer.json
└── composer.lock
Quick Validation Commands
# Check Symfony requirements
bin/console about
# Verify services are wired correctly
bin/console debug:autowiring
# Check routes
bin/console debug:router
# Verify Doctrine configuration
bin/console doctrine:mapping:info
# Check container compilation
bin/console cache:clear
Common Issues & Fixes
1. Missing APP_SECRET
# .env
APP_SECRET=your-secret-here
# Generate new secret
php -r "echo bin2hex(random_bytes(16));"
2. Database Not Configured
# .env
DATABASE_URL="postgresql://user:pass@127.0.0.1:5432/db?serverVersion=15"
# or
DATABASE_URL="mysql://user:pass@127.0.0.1:3306/db?serverVersion=8.0"
3. Cache Permission Issues
# Clear and warm cache
bin/console cache:clear
bin/console cache:warmup
# Fix permissions
chmod -R 777 var/cache var/log
# Or better, use ACL
setfacl -R -m u:www-data:rwX var
setfacl -dR -m u:www-data:rwX var
4. Missing Vendor Directory
composer install
5. Doctrine Schema Out of Sync
# Check differences
bin/console doctrine:schema:validate
# Generate migration
bin/console make:migration
# Run migrations
bin/console doctrine:migrations:migrate
API Platform Check
If using API Platform:
# Verify API Platform is working
bin/console debug:router | grep api
# Check API resources
bin/console api:openapi:export
# Verify serialization groups
bin/console debug:serializer
Messenger Check
If using Messenger:
# Verify transports
bin/console debug:messenger
# Check routing
bin/console debug:config framework messenger
Pre-Development Checklist
-
.envfile exists with required variables -
composer installexecuted - Database connection working
-
bin/console cache:clearsucceeds -
bin/console debug:autowiringshows services - All migrations executed
- (Optional) Fixtures loaded for development