File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ public function __construct(
138138
139139 // Close connection and remove it from the pool.
140140 $ idle ->shift ();
141- /** @psalm-suppress InvalidArgument SplObjectStorage::detach () expects an argument. */
142- $ connections ->detach ($ connection );
141+ /** @psalm-suppress InvalidArgument SplObjectStorage::offsetUnset () expects an argument. */
142+ $ connections ->offsetUnset ($ connection );
143143 $ connection ->close ();
144144 }
145145 });
@@ -232,7 +232,7 @@ public function close(): void
232232 public function extractConnection (): SqlConnection
233233 {
234234 $ connection = $ this ->pop ();
235- $ this ->connections ->detach ($ connection );
235+ $ this ->connections ->offsetUnset ($ connection );
236236 return $ connection ;
237237 }
238238
@@ -292,7 +292,7 @@ protected function pop(): SqlConnection
292292 break 2 ; // Break to throwing exception.
293293 }
294294
295- $ this ->connections ->attach ($ connection );
295+ $ this ->connections ->offsetSet ($ connection );
296296 return $ connection ;
297297 }
298298
@@ -315,7 +315,7 @@ protected function pop(): SqlConnection
315315 return $ connection ;
316316 }
317317
318- $ this ->connections ->detach ($ connection );
318+ $ this ->connections ->offsetUnset ($ connection );
319319 } while (!$ this ->isClosed ());
320320
321321 throw new SqlException ("Pool closed before an active connection could be obtained " );
You can’t perform that action at this time.
0 commit comments