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
This commit is contained in:
2026-03-04 00:35:20 +01:00
parent 129ea58dae
commit b356033f7b
15 changed files with 257 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ use MiniShop\Invoicing\Infrastructure\Persistence\InMemoryInvoiceRepository;
use MiniShop\Invoicing\Infrastructure\SequentialInvoiceNumberGenerator;
use MiniShop\Invoicing\Interfaces\Messaging\WhenOrderConfirmed;
use MiniShop\Invoicing\Application\Command\IssueInvoiceForExternalOrderHandler;
use MiniShop\Shared\Technical\InMemoryIdempotencyStore;
use MiniShop\Shared\Technical\SystemClock;
use PHPUnit\Framework\TestCase;
@@ -27,6 +28,7 @@ final class InvoicingConformistTest extends TestCase
new SequentialInvoiceNumberGenerator(),
new SystemClock(),
),
new InMemoryIdempotencyStore(),
);
$consumer(new OrderConfirmed(