Skip to content

Commit 538bc3f

Browse files
authored
Make reconnectIfMissingConnection public (#41594)
I've use-cases where I need to get the PDO from a connection but also need to respect, in case a disconnect happened, to perform a reconnect. Currently, I've to: - get pdo - check if null - call reconnect everywhere I need it. Or I could just call this one on the connection object, if it were public, and then get the PDO.
1 parent 65f0bac commit 538bc3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ public function reconnect()
814814
*
815815
* @return void
816816
*/
817-
protected function reconnectIfMissingConnection()
817+
public function reconnectIfMissingConnection()
818818
{
819819
if (is_null($this->pdo)) {
820820
$this->reconnect();

0 commit comments

Comments
 (0)