Step 00 — Squelette + intégration naïve

3 Bounded Contexts (Sales, Invoicing, LegacyFulfillment) avec :
- Domaines complets (agrégats, VOs, événements, invariants)
- Couche application (commands, queries, ports)
- Infrastructure in-memory (repos, gateway fake)
- Controllers HTTP Symfony
- Couplage naïf synchrone entre BC via NaiveSalesEventPublisher
- 20 tests unitaires et d'intégration passants
This commit is contained in:
2026-03-04 00:27:15 +01:00
commit a4a14e441b
86 changed files with 7059 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace MiniShop\Sales\Application\Query;
use MiniShop\Sales\Application\Port\OrderRepository;
use MiniShop\Sales\Domain\Model\CustomerId;
use MiniShop\Sales\Domain\Model\Order;
final readonly class ListOrdersByCustomerHandler
{
public function __construct(
private OrderRepository $orderRepository,
) {}
/** @return list<Order> */
public function __invoke(ListOrdersByCustomer $query): array
{
return $this->orderRepository->findByCustomer(CustomerId::fromString($query->customerId));
}
}