Skip to content

Commit 5af4d22

Browse files
committed
Work around the removal of Connection::connect()
1 parent 203391d commit 5af4d22

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Test/DbalPersistedConnection.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ class DbalPersistedConnection extends Connection
2222
*/
2323
protected static $persistedTransactionNestingLevels;
2424

25-
public function connect()
25+
public function connect(): DriverConnection
2626
{
2727
if ($this->isConnected()) {
28-
return false;
28+
return $this->_conn;
2929
}
3030

3131
if ($this->hasPersistedConnection()) {
@@ -35,28 +35,22 @@ public function connect()
3535
$this->persistConnection($this->_conn);
3636
}
3737

38-
return true;
38+
return $this->_conn;
3939
}
4040

41-
public function beginTransaction()
41+
public function beginTransaction(): void
4242
{
4343
$this->wrapTransactionNestingLevel('beginTransaction');
44-
45-
return true;
4644
}
4745

48-
public function commit()
46+
public function commit(): void
4947
{
5048
$this->wrapTransactionNestingLevel('commit');
51-
52-
return true;
5349
}
5450

55-
public function rollBack()
51+
public function rollBack(): void
5652
{
5753
$this->wrapTransactionNestingLevel('rollBack');
58-
59-
return true;
6054
}
6155

6256
/**

0 commit comments

Comments
 (0)