@@ -132,23 +132,23 @@ public static function create($uri, ?DriverConfiguration $configuration = null,
132
132
public function createSession (?SessionConfiguration $ config = null ): SessionInterface
133
133
{
134
134
$ bindings = $ this ->config ->getHttpPsrBindings ();
135
- $ factory = Resolvable::once ($ this ->key , static function () use ($ bindings ) {
135
+ $ factory = Resolvable::once ($ this ->key . ' :requestFactory ' , function () use ($ bindings ) {
136
136
return new RequestFactory ($ bindings ->getRequestFactory (), $ this ->auth , $ this ->uri , $ this ->config ->getUserAgent ());
137
137
});
138
138
$ config ??= SessionConfiguration::default ();
139
139
$ config = $ config ->merge (SessionConfiguration::fromUri ($ this ->uri ));
140
- $ streamFactoryResolve = Resolvable::once ($ this ->key , static fn () => $ bindings ->getStreamFactory ());
141
- $ clientResolve = Resolvable::once ($ this ->key , static fn () => $ bindings ->getClient ());
140
+ $ streamFactoryResolve = Resolvable::once ($ this ->key . ' :streamFactory ' , static fn () => $ bindings ->getStreamFactory ());
141
+ $ clientResolve = Resolvable::once ($ this ->key . ' :client ' , static fn () => $ bindings ->getClient ());
142
142
143
143
return new HttpSession (
144
144
$ streamFactoryResolve ,
145
145
new HttpConnectionPool ($ clientResolve , $ factory , $ streamFactoryResolve ),
146
146
$ config ,
147
147
$ this ->formatter ,
148
148
$ factory ,
149
- Resolvable::once ($ this ->key , function () use ($ config ) {
149
+ Resolvable::once ($ this ->key . ' :tsxUrl ' , function () use ($ config, $ factory ) {
150
150
$ database = $ config ->getDatabase ();
151
- $ request = $ this -> config -> getHttpPsrBindings ()-> getRequestFactory ()->createRequest ('GET ' , $ this ->uri );
151
+ $ request = $ factory -> resolve ()->createRequest ('GET ' , $ this ->uri );
152
152
$ client = $ this ->config ->getHttpPsrBindings ()->getClient ();
153
153
154
154
$ response = $ client ->sendRequest ($ request );
0 commit comments