File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/Bundle/JoseFramework/Resources/config Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1414use Jose \Component \KeyManagement ;
1515use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
1616use function Symfony \Component \DependencyInjection \Loader \Configurator \ref ;
17+ use Symfony \Component \DependencyInjection \Loader \Configurator \ReferenceConfigurator ;
18+ use function Symfony \Component \DependencyInjection \Loader \Configurator \service ;
1719
1820return function (ContainerConfigurator $ container ): void {
1921 $ container = $ container ->services ()->defaults ()
2224 ->autowire ()
2325 ;
2426
27+ $ serviceClosure = static function (string $ serviceId ): ReferenceConfigurator {
28+ return function_exists ('Symfony\Component\DependencyInjection\Loader\Configurator\service ' )
29+ ? service ($ serviceId )
30+ : ref ($ serviceId );
31+ };
32+
2533 $ container ->set (KeyManagement \JKUFactory::class)
2634 ->public ()
2735 ->args ([
28- ref ('jose.http_client ' ),
29- ref ('jose.request_factory ' ),
36+ ( $ serviceClosure ) ('jose.http_client ' ),
37+ ( $ serviceClosure ) ('jose.request_factory ' ),
3038 ])
3139 ;
3240
3341 $ container ->set (KeyManagement \X5UFactory::class)
3442 ->public ()
3543 ->args ([
36- ref ('jose.http_client ' ),
37- ref ('jose.request_factory ' ),
44+ ( $ serviceClosure ) ('jose.http_client ' ),
45+ ( $ serviceClosure ) ('jose.request_factory ' ),
3846 ])
3947 ;
4048};
You can’t perform that action at this time.
0 commit comments