Skip to content

Commit

Permalink
[doctrineGH-4054] Convert MasterSlaveConnection to Doctrine deprecati…
Browse files Browse the repository at this point in the history
…ons API.
  • Loading branch information
beberlei committed Mar 22, 2021
1 parent 3f2e3f2 commit 59148f4
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
use Doctrine\Common\EventManager;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Driver;
use Doctrine\Deprecations\Deprecation;
use InvalidArgumentException;

use function sprintf;
use function trigger_error;

use const E_USER_DEPRECATED;

/**
* @deprecated Use PrimaryReadReplicaConnection instead
*
Expand Down Expand Up @@ -94,13 +90,12 @@ public function connect($connectionName = null)

private function deprecated(string $thing, string $instead): void
{
@trigger_error(
sprintf(
'%s is deprecated since doctrine/dbal 2.11 and will be removed in 3.0, use %s instead.',
$thing,
$instead
),
E_USER_DEPRECATED
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4054',
'%s is deprecated since doctrine/dbal 2.11 and will be removed in 3.0, use %s instead.',
$thing,
$instead
);
}
}

0 comments on commit 59148f4

Please sign in to comment.