From 733874100038135ebd316eead28e749d2fdb510a Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 9 Jun 2020 15:10:47 +0200 Subject: [PATCH] Update configuration, use decorators pattern. --- .../config/packages/eulogin_cas_services.yaml | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Resources/config/packages/eulogin_cas_services.yaml b/Resources/config/packages/eulogin_cas_services.yaml index 2d469c0..a0007ac 100644 --- a/Resources/config/packages/eulogin_cas_services.yaml +++ b/Resources/config/packages/eulogin_cas_services.yaml @@ -1,15 +1,13 @@ services: eulogin.userprovider: class: EcPhp\EuLoginBundle\Security\Core\User\EuLoginUserProvider - cas: + + ecas.configuration: + class: EcPhp\Ecas\EcasProperties + decorates: 'cas.configuration' + arguments: ['@ecas.configuration.inner', '@request_stack'] + + ecas: class: EcPhp\Ecas\Ecas - arguments: - $serverRequest: '@cas.psrrequest' - $properties: '@cas.configuration' - $client: '@psr18.http_client' - $uriFactory: '@cas.psr17_factory' - $responseFactory: '@cas.psr17_factory' - $requestFactory: '@cas.psr17_factory' - $streamFactory: '@cas.psr17_factory' - $cache: '@cache.app' - $logger: '@logger' + decorates: 'cas' + arguments: ['@ecas.inner', '@nyholm.psr7.psr17_factory']