@@ -39,16 +39,13 @@ final class DriverConfiguration
3939 public const DEFAULT_POOL_SIZE = 0x2F ;
4040 public const DEFAULT_CACHE_IMPLEMENTATION = Cache::class;
4141 public const DEFAULT_ACQUIRE_CONNECTION_TIMEOUT = 2.0 ;
42- /** @var callable():(HttpPsrBindings|null)|HttpPsrBindings|null */
43- private $ httpPsrBindings ;
4442 /** @var callable():(CacheInterface|null)|CacheInterface|null */
4543 private $ cache ;
4644 /** @var callable():(SemaphoreFactoryInterface|null)|SemaphoreFactoryInterface|null */
4745 private $ semaphoreFactory ;
4846 private ?Neo4jLogger $ logger ;
4947
5048 /**
51- * @param callable():(HttpPsrBindings|null)|HttpPsrBindings|null $httpPsrBindings
5249 * @param callable():(CacheInterface|null)|CacheInterface|null $cache
5350 * @param callable():(SemaphoreFactoryInterface|null)|SemaphoreFactoryInterface|null $semaphore
5451 * @param string|null $logLevel The log level to use. If null, LogLevel::INFO is used.
@@ -57,7 +54,6 @@ final class DriverConfiguration
5754 */
5855 public function __construct (
5956 private string |null $ userAgent ,
60- callable |HttpPsrBindings |null $ httpPsrBindings ,
6157 private SslConfiguration $ sslConfig ,
6258 private int |null $ maxPoolSize ,
6359 CacheInterface |callable |null $ cache ,
@@ -66,7 +62,6 @@ public function __construct(
6662 ?string $ logLevel ,
6763 ?LoggerInterface $ logger
6864 ) {
69- $ this ->httpPsrBindings = $ httpPsrBindings ;
7065 $ this ->cache = $ cache ;
7166 $ this ->semaphoreFactory = $ semaphore ;
7267 if ($ logger !== null ) {
@@ -77,13 +72,10 @@ public function __construct(
7772 }
7873
7974 /**
80- * @param callable():(HttpPsrBindings|null)|HttpPsrBindings|null $httpPsrBindings
81- *
8275 * @pure
8376 */
8477 public static function create (
8578 ?string $ userAgent ,
86- callable |HttpPsrBindings |null $ httpPsrBindings ,
8779 SslConfiguration $ sslConfig ,
8880 int $ maxPoolSize ,
8981 CacheInterface $ cache ,
@@ -94,7 +86,6 @@ public static function create(
9486 ): self {
9587 return new self (
9688 $ userAgent ,
97- $ httpPsrBindings ,
9889 $ sslConfig ,
9990 $ maxPoolSize ,
10091 $ cache ,
@@ -107,15 +98,14 @@ public static function create(
10798
10899 /**
109100 * Creates a default configuration with a user agent based on the driver version
110- * and HTTP PSR implementation auto-detected from the environment.
101+ * auto-detected from the environment.
111102 *
112103 * @pure
113104 */
114105 public static function default (): self
115106 {
116107 return new self (
117108 null ,
118- HttpPsrBindings::default (),
119109 SslConfiguration::default (),
120110 null ,
121111 null ,
@@ -160,21 +150,6 @@ public function withUserAgent($userAgent): self
160150 return $ tbr ;
161151 }
162152
163- /**
164- * Creates a new configuration with the provided bindings.
165- *
166- * @param callable():(HttpPsrBindings|null)|HttpPsrBindings|null $bindings
167- *
168- * @psalm-immutable
169- */
170- public function withHttpPsrBindings ($ bindings ): self
171- {
172- $ tbr = clone $ this ;
173- $ tbr ->httpPsrBindings = $ bindings ;
174-
175- return $ tbr ;
176- }
177-
178153 /**
179154 * @psalm-immutable
180155 */
@@ -194,15 +169,6 @@ public function getSslConfiguration(): SslConfiguration
194169 return $ this ->sslConfig ;
195170 }
196171
197- public function getHttpPsrBindings (): HttpPsrBindings
198- {
199- $ this ->httpPsrBindings = (is_callable ($ this ->httpPsrBindings )) ? call_user_func (
200- $ this ->httpPsrBindings
201- ) : $ this ->httpPsrBindings ;
202-
203- return $ this ->httpPsrBindings ??= HttpPsrBindings::default ();
204- }
205-
206172 public function getMaxPoolSize (): int
207173 {
208174 return $ this ->maxPoolSize ?? self ::DEFAULT_POOL_SIZE ;
0 commit comments