[#ED-1] Ajout des API de lecture bovin (#2)
All checks were successful
Auto Tag Develop / tag (push) Successful in 6s
Build Release Artefact / build (push) Successful in 39s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [x] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: #2
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #2.
This commit is contained in:
2026-04-21 08:14:37 +00:00
committed by Autin
parent 16798d9abb
commit f757822f36
29 changed files with 3416 additions and 208 deletions

View File

@@ -33,3 +33,36 @@ Dans le docker-composer.yaml
volumes:
- ../ednotif-bundle:/var/www/html/ednotif-bundle
```
## Utilisation
Le bundle expose `Malio\EdnotifBundle\Bovin\Api\BovinApiInterface`. Injection standard par autowiring.
```php
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
final class MyController
{
public function __construct(private BovinApiInterface $ednotif) {}
public function example(): void
{
// Dossier d'un bovin
$file = $this->ednotif->getAnimalFile('FR1234567890');
// Inventaire du cheptel à une date
$inventory = $this->ednotif->getInventory(
startDate: new \DateTimeImmutable('2026-01-01'),
includeEarTagStock: true,
);
// Retours de notifications depuis une date
$returns = $this->ednotif->getReturnedDossiers(new \DateTimeImmutable('2026-03-01'));
// Sorties présumées par l'IPG (flux de rapprochement)
$presumed = $this->ednotif->getPresumedExits();
}
}
```
Toutes les méthodes lèvent `Malio\EdnotifBundle\Shared\Exception\EdnotifException` en cas de `Resultat=false` côté EDNOTIF.