Checklist:
Recommended Structure:
src/ ├── Domain/ │ ├── Entity/ │ ├── ValueObject/ │ ├── Repository/ │ ├── Service/ │ └── Event/ │ ├── Application/ │ ├── Command/ │ ├── Query/ │ ├── Handler/ │ ├── DTO/ │ └── UseCase/ │ ├── Infrastructure/ │ ├── Persistence/ │ ├── Messaging/ │ ├── ExternalApi/ │ └── Security/ │ ├── Presentation/ │ ├── Controller/ │ ├── Request/ │ └── Response/
Checklist:
Bad:
public function create() { // validation // business logic // database // email sending }
Good:
public function create( CreateOrderCommand $command ) { $this->commandBus->dispatch($command); }
Checklist:
Example:
OrderService PaymentService InventoryService UserRegistrationService
Checklist:
Checklist:
Good:
class OrderService { public function __construct( private OrderRepository $repository ) {} }
Bad:
$container->get('service');
Checklist:
Bad:
public string $status;
Good:
private string $status; public function markPaid(): void { ... }
Checklist:
Example:
Money Email Address PhoneNumber
Checklist:
Checklist:
Bad:
foreach ($orders as $order) { echo $order->getCustomer()->getName(); }
Good:
SELECT o,c FROM Order o JOIN FETCH o.customer c
Checklist:
Commands:
php bin/console make:migration php bin/console doctrine:migrations:migrate
Checklist:
Checklist:
Checklist:
Example:
{
"success": true,
"data": {}
}
Checklist:
Checklist:
Good:
$this->denyAccessUnlessGranted( 'ORDER_EDIT', $order );
Checklist:
Checklist:
Example:
#[Assert\NotBlank] #[Assert\Email] private string $email;
Checklist:
Good Candidates:
Example:
$messageBus->dispatch( new ProcessOrderMessage() );
Checklist:
Examples:
OrderCreated OrderPaid UserRegistered InvoiceGenerated
Checklist:
Example:
$cache->get( 'products', fn() => $repository->findAll() );
Checklist:
Good:
$logger->info( 'Order created', ['orderId' => $orderId] );
Checklist:
Checklist:
Example:
$em->flush(); $em->clear();
Checklist:
Checklist:
Checklist:
Coverage Targets:
Checklist:
Pipeline:
Git Push ↓ PHP-CS-Fixer ↓ PHPStan ↓ Unit Tests ↓ Integration Tests ↓ Build ↓ Deploy
Checklist:
Checklist:
Checklist:
Checklist:
Checklist:
Checklist:
Production Commands:
php bin/console cache:clear --env=prod php bin/console cache:warmup --env=prod composer install --no-dev --optimize-autoloader
If all answers are YES, the Symfony application is Production Ready.
| Category | Target |
|---|---|
| Architecture | 9/10 |
| Domain Design | 9/10 |
| Security | 9/10 |
| Performance | 9/10 |
| Testing | 8/10+ |
| Scalability | 9/10 |
| Observability | 8/10+ |
| Maintainability | 9/10 |
Overall Production Grade Target: >= 85%
For Symfony, one additional review area that many senior teams emphasize is DDD + CQRS + Messenger:
Domain ├── Entities ├── Value Objects ├── Domain Events └── Repository Interfaces Application ├── Commands ├── Command Handlers ├── Queries ├── Query Handlers └── DTOs Infrastructure ├── Doctrine ├── Messenger ├── Redis ├── External APIs └── Security Presentation ├── Controllers ├── API └── Console Commands