Files
DDDBoilerplate/apps/symfony/config/services.yaml
Mathias STRASSER b356033f7b Step 05 — Hardening
- CorrelationId VO pour le tracing inter-BC
- IdempotencyStore (interface + InMemory) pour garde d'idempotence
- correlationId ajouté aux contrats Published Language (retro-compatible par défaut)
- Consumers Invoicing et LegacyFulfillment idempotents avec logging
- MessengerSalesEventPublisher propage les correlationIds
- Tests unitaires idempotence + tests d'intégration consommateurs idempotents
2026-03-04 00:35:20 +01:00

66 lines
2.4 KiB
YAML

services:
_defaults:
autowire: true
autoconfigure: true
# --- Shared ---
MiniShop\Shared\:
resource: '%kernel.project_dir%/src/Shared/'
MiniShop\Shared\Technical\Clock:
alias: MiniShop\Shared\Technical\SystemClock
MiniShop\Shared\Technical\IdempotencyStore:
alias: MiniShop\Shared\Technical\InMemoryIdempotencyStore
# --- Sales ---
MiniShop\Sales\Application\:
resource: '%kernel.project_dir%/src/Sales/Application/'
MiniShop\Sales\Infrastructure\:
resource: '%kernel.project_dir%/src/Sales/Infrastructure/'
MiniShop\Sales\Interfaces\:
resource: '%kernel.project_dir%/src/Sales/Interfaces/'
tags: ['controller.service_arguments']
MiniShop\Sales\Application\Port\OrderRepository:
alias: MiniShop\Sales\Infrastructure\Persistence\InMemoryOrderRepository
MiniShop\Sales\Application\Port\SalesEventPublisher:
alias: MiniShop\Sales\Infrastructure\Messaging\MessengerSalesEventPublisher
# --- Invoicing ---
MiniShop\Invoicing\Application\:
resource: '%kernel.project_dir%/src/Invoicing/Application/'
MiniShop\Invoicing\Infrastructure\:
resource: '%kernel.project_dir%/src/Invoicing/Infrastructure/'
MiniShop\Invoicing\Interfaces\:
resource: '%kernel.project_dir%/src/Invoicing/Interfaces/'
tags: ['controller.service_arguments']
MiniShop\Invoicing\Application\Port\InvoiceRepository:
alias: MiniShop\Invoicing\Infrastructure\Persistence\InMemoryInvoiceRepository
MiniShop\Invoicing\Application\Port\InvoiceNumberGenerator:
alias: MiniShop\Invoicing\Infrastructure\SequentialInvoiceNumberGenerator
# --- LegacyFulfillment ---
MiniShop\LegacyFulfillment\Application\:
resource: '%kernel.project_dir%/src/LegacyFulfillment/Application/'
MiniShop\LegacyFulfillment\Infrastructure\:
resource: '%kernel.project_dir%/src/LegacyFulfillment/Infrastructure/'
MiniShop\LegacyFulfillment\Interfaces\:
resource: '%kernel.project_dir%/src/LegacyFulfillment/Interfaces/'
tags: ['controller.service_arguments']
MiniShop\LegacyFulfillment\Application\Port\ShipmentRequestRepository:
alias: MiniShop\LegacyFulfillment\Infrastructure\Persistence\InMemoryShipmentRequestRepository
MiniShop\LegacyFulfillment\Application\Port\LegacyFulfillmentGateway:
alias: MiniShop\LegacyFulfillment\Infrastructure\Gateway\FakeLegacyFulfillmentGateway