@@ -39,16 +39,13 @@ final class DriverConfiguration
39
39
public const DEFAULT_POOL_SIZE = 0x2F ;
40
40
public const DEFAULT_CACHE_IMPLEMENTATION = Cache::class;
41
41
public const DEFAULT_ACQUIRE_CONNECTION_TIMEOUT = 2.0 ;
42
- /** @var callable():(HttpPsrBindings|null)|HttpPsrBindings|null */
43
- private $ httpPsrBindings ;
44
42
/** @var callable():(CacheInterface|null)|CacheInterface|null */
45
43
private $ cache ;
46
44
/** @var callable():(SemaphoreFactoryInterface|null)|SemaphoreFactoryInterface|null */
47
45
private $ semaphoreFactory ;
48
46
private ?Neo4jLogger $ logger ;
49
47
50
48
/**
51
- * @param callable():(HttpPsrBindings|null)|HttpPsrBindings|null $httpPsrBindings
52
49
* @param callable():(CacheInterface|null)|CacheInterface|null $cache
53
50
* @param callable():(SemaphoreFactoryInterface|null)|SemaphoreFactoryInterface|null $semaphore
54
51
* @param string|null $logLevel The log level to use. If null, LogLevel::INFO is used.
@@ -57,7 +54,6 @@ final class DriverConfiguration
57
54
*/
58
55
public function __construct (
59
56
private string |null $ userAgent ,
60
- callable |HttpPsrBindings |null $ httpPsrBindings ,
61
57
private SslConfiguration $ sslConfig ,
62
58
private int |null $ maxPoolSize ,
63
59
CacheInterface |callable |null $ cache ,
@@ -66,7 +62,6 @@ public function __construct(
66
62
?string $ logLevel ,
67
63
?LoggerInterface $ logger
68
64
) {
69
- $ this ->httpPsrBindings = $ httpPsrBindings ;
70
65
$ this ->cache = $ cache ;
71
66
$ this ->semaphoreFactory = $ semaphore ;
72
67
if ($ logger !== null ) {
@@ -77,13 +72,10 @@ public function __construct(
77
72
}
78
73
79
74
/**
80
- * @param callable():(HttpPsrBindings|null)|HttpPsrBindings|null $httpPsrBindings
81
- *
82
75
* @pure
83
76
*/
84
77
public static function create (
85
78
?string $ userAgent ,
86
- callable |HttpPsrBindings |null $ httpPsrBindings ,
87
79
SslConfiguration $ sslConfig ,
88
80
int $ maxPoolSize ,
89
81
CacheInterface $ cache ,
@@ -94,7 +86,6 @@ public static function create(
94
86
): self {
95
87
return new self (
96
88
$ userAgent ,
97
- $ httpPsrBindings ,
98
89
$ sslConfig ,
99
90
$ maxPoolSize ,
100
91
$ cache ,
@@ -107,15 +98,14 @@ public static function create(
107
98
108
99
/**
109
100
* 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.
111
102
*
112
103
* @pure
113
104
*/
114
105
public static function default (): self
115
106
{
116
107
return new self (
117
108
null ,
118
- HttpPsrBindings::default (),
119
109
SslConfiguration::default (),
120
110
null ,
121
111
null ,
@@ -160,21 +150,6 @@ public function withUserAgent($userAgent): self
160
150
return $ tbr ;
161
151
}
162
152
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
-
178
153
/**
179
154
* @psalm-immutable
180
155
*/
@@ -194,15 +169,6 @@ public function getSslConfiguration(): SslConfiguration
194
169
return $ this ->sslConfig ;
195
170
}
196
171
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
-
206
172
public function getMaxPoolSize (): int
207
173
{
208
174
return $ this ->maxPoolSize ?? self ::DEFAULT_POOL_SIZE ;
0 commit comments