refactor : factoriser mapStandardResponse + includesEarTagStock nullable

This commit is contained in:
2026-04-21 08:49:28 +02:00
parent 56c852ed59
commit c7709de753
6 changed files with 72 additions and 47 deletions

View File

@@ -6,6 +6,7 @@ use Malio\EdnotifBundle\Auth\TokenProvider;
use Malio\EdnotifBundle\Bovin\Api\BovinApi;
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
use Malio\EdnotifBundle\Bovin\Mapper\AnimalFileMapper;
use Malio\EdnotifBundle\Shared\Mapper\StandardResponseMapper;
use Malio\EdnotifBundle\Shared\Soap\SoapClientFactory;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
@@ -22,6 +23,8 @@ return static function (ContainerConfigurator $container): void {
->arg('$soapOptions', '%ednotif.soap_options%')
;
$services->set(StandardResponseMapper::class);
$services->set('ednotif.soap.guichet', SoapClient::class)
->factory([service(SoapClientFactory::class), 'create'])
->args(['%ednotif.guichet_wsdl%'])
@@ -32,7 +35,7 @@ return static function (ContainerConfigurator $container): void {
->args(['%ednotif.metier_wsdl%'])
;
$services->set(AnimalFileMapper::class);
$services->set(AnimalFileMapper::class)->args([service(StandardResponseMapper::class)]);
$services->set(TokenProvider::class)
->args([