@@ -42,6 +42,30 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
42
42
$ eventListenerProvider = new Reference ($ eventListenerProvider );
43
43
}
44
44
45
+ $ httpClient = $ config ['sdk ' ]['http_client ' ] ?? null ;
46
+
47
+ if (null !== $ httpClient && '' !== $ httpClient ) {
48
+ $ httpClient = new Reference ($ httpClient );
49
+ }
50
+
51
+ $ httpRequestFactory = $ config ['sdk ' ]['http_request_factory ' ] ?? null ;
52
+
53
+ if (null !== $ httpRequestFactory && '' !== $ httpRequestFactory ) {
54
+ $ httpRequestFactory = new Reference ($ httpRequestFactory );
55
+ }
56
+
57
+ $ httpResponseFactory = $ config ['sdk ' ]['http_response_factory ' ] ?? null ;
58
+
59
+ if (null !== $ httpResponseFactory && '' !== $ httpResponseFactory ) {
60
+ $ httpResponseFactory = new Reference ($ httpResponseFactory );
61
+ }
62
+
63
+ $ httpStreamFactory = $ config ['sdk ' ]['http_stream_factory ' ] ?? null ;
64
+
65
+ if (null !== $ httpStreamFactory && '' !== $ httpStreamFactory ) {
66
+ $ httpStreamFactory = new Reference ($ httpStreamFactory );
67
+ }
68
+
45
69
$ audiences = $ config ['sdk ' ]['audiences ' ] ?? [];
46
70
$ organizations = $ config ['sdk ' ]['organizations ' ] ?? [];
47
71
$ scopes = $ config ['sdk ' ]['scopes ' ] ?? [];
@@ -79,11 +103,11 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
79
103
->arg ('$tokenLeeway ' , $ config ['sdk ' ]['token_leeway ' ] ?? 60 )
80
104
->arg ('$tokenCache ' , $ tokenCache )
81
105
->arg ('$tokenCacheTtl ' , $ config ['sdk ' ]['token_cache_ttl ' ])
82
- ->arg ('$httpClient ' , $ config [ ' sdk ' ][ ' http_client ' ] )
106
+ ->arg ('$httpClient ' , $ httpClient )
83
107
->arg ('$httpMaxRetries ' , $ config ['sdk ' ]['http_max_retries ' ])
84
- ->arg ('$httpRequestFactory ' , $ config [ ' sdk ' ][ ' http_request_factory ' ] )
85
- ->arg ('$httpResponseFactory ' , $ config [ ' sdk ' ][ ' http_response_factory ' ] )
86
- ->arg ('$httpStreamFactory ' , $ config [ ' sdk ' ][ ' http_stream_factory ' ] )
108
+ ->arg ('$httpRequestFactory ' , $ httpRequestFactory )
109
+ ->arg ('$httpResponseFactory ' , $ httpResponseFactory )
110
+ ->arg ('$httpStreamFactory ' , $ httpStreamFactory )
87
111
->arg ('$httpTelemetry ' , $ config ['sdk ' ]['http_telemetry ' ])
88
112
->arg ('$sessionStorage ' , $ sessionStorage )
89
113
->arg ('$sessionStorageId ' , $ sessionStoragePrefix )
0 commit comments