Skip to content

Commit

Permalink
[doctrineGH-4052] Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Jun 8, 2020
1 parent 3e87bf2 commit cc1d46d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function connect($connectionName = null)
return $this->performConnect();
}

private function performConnect($connectionName = null)
private function performConnect(?string $connectionName = null): bool
{
$requestedConnectionChange = ($connectionName !== null);
$connectionName = $connectionName ?: 'replica';
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/DBAL/DriverManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Connections\PrimaryReplicaConnection;
use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver as DrizzlePDOMySqlDriver;
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testDatabaseUrlPrimaryReplica(): void
'replica' => [
'replica1' => ['url' => 'mysql://foo:bar@localhost:11211/baz_replica'],
],
'wrapperClass' => PrimaryReplicaConnection::class,
'wrapperClass' => PrimaryReadReplicaConnection::class,
];

$conn = DriverManager::getConnection($options);
Expand Down

0 comments on commit cc1d46d

Please sign in to comment.