Skip to content

Commit 8a6767f

Browse files
committed
Remove circular reference
1 parent 0b53098 commit 8a6767f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Connection.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ abstract class Connection implements Link, Handle
2121
/** @var Deferred|null Used to only allow one transaction at a time. */
2222
private $busy;
2323

24-
/** @var callable */
25-
protected $release;
26-
2724
/**
2825
* @param ConnectionConfig $connectionConfig
2926
* @param CancellationToken $token
@@ -38,7 +35,6 @@ abstract public static function connect(ConnectionConfig $connectionConfig, Canc
3835
public function __construct(Handle $handle)
3936
{
4037
$this->handle = $handle;
41-
$this->release = $this->callableFromInstanceMethod("release");
4238
}
4339

4440

@@ -213,7 +209,7 @@ final public function beginTransaction(int $isolation = Transaction::ISOLATION_C
213209

214210
$this->busy = new Deferred;
215211

216-
return new ConnectionTransaction($this->handle, $this->release, $isolation);
212+
return new ConnectionTransaction($this->handle, $this->callableFromInstanceMethod("release"), $isolation);
217213
});
218214
}
219215

0 commit comments

Comments
 (0)