chore(directory) : ferme contrats Repository (findBy) + bindings DI MCP Directory
Plumbing complementaire des outils MCP ajoutes en 99626b8 :
- declare findBy() sur Address/Contact/CommercialReport RepositoryInterface
(Prestataire l'avait deja) pour exposer la methode au contrat DDD
- bindings explicites des 4 repos dans services.yaml (cohrence avec
Client/Prospect, meme si Symfony auto-alias l'interface vers l'unique
implementation)
This commit is contained in:
@@ -113,6 +113,14 @@ services:
|
|||||||
|
|
||||||
App\Module\Directory\Domain\Repository\ProspectRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrineProspectRepository'
|
App\Module\Directory\Domain\Repository\ProspectRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrineProspectRepository'
|
||||||
|
|
||||||
|
App\Module\Directory\Domain\Repository\PrestataireRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrinePrestataireRepository'
|
||||||
|
|
||||||
|
App\Module\Directory\Domain\Repository\ContactRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrineContactRepository'
|
||||||
|
|
||||||
|
App\Module\Directory\Domain\Repository\AddressRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrineAddressRepository'
|
||||||
|
|
||||||
|
App\Module\Directory\Domain\Repository\CommercialReportRepositoryInterface: '@App\Module\Directory\Infrastructure\Doctrine\DoctrineCommercialReportRepository'
|
||||||
|
|
||||||
App\Module\Directory\Infrastructure\EventListener\CommercialReportAuthorListener:
|
App\Module\Directory\Infrastructure\EventListener\CommercialReportAuthorListener:
|
||||||
tags:
|
tags:
|
||||||
- { name: doctrine.orm.entity_listener, entity: 'App\Module\Directory\Domain\Entity\CommercialReport', event: prePersist }
|
- { name: doctrine.orm.entity_listener, entity: 'App\Module\Directory\Domain\Entity\CommercialReport', event: prePersist }
|
||||||
|
|||||||
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\Address;
|
|||||||
interface AddressRepositoryInterface
|
interface AddressRepositoryInterface
|
||||||
{
|
{
|
||||||
public function findById(int $id): ?Address;
|
public function findById(int $id): ?Address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $criteria
|
||||||
|
* @param null|array<string, string> $orderBy
|
||||||
|
*
|
||||||
|
* @return Address[]
|
||||||
|
*/
|
||||||
|
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\CommercialReport;
|
|||||||
interface CommercialReportRepositoryInterface
|
interface CommercialReportRepositoryInterface
|
||||||
{
|
{
|
||||||
public function findById(int $id): ?CommercialReport;
|
public function findById(int $id): ?CommercialReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $criteria
|
||||||
|
* @param null|array<string, string> $orderBy
|
||||||
|
*
|
||||||
|
* @return CommercialReport[]
|
||||||
|
*/
|
||||||
|
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\Contact;
|
|||||||
interface ContactRepositoryInterface
|
interface ContactRepositoryInterface
|
||||||
{
|
{
|
||||||
public function findById(int $id): ?Contact;
|
public function findById(int $id): ?Contact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $criteria
|
||||||
|
* @param null|array<string, string> $orderBy
|
||||||
|
*
|
||||||
|
* @return Contact[]
|
||||||
|
*/
|
||||||
|
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user