diff --git a/lib/Doctrine/DBAL/Logging/LoggerChain.php b/lib/Doctrine/DBAL/Logging/LoggerChain.php index 024afae283a..44d1db33665 100644 --- a/lib/Doctrine/DBAL/Logging/LoggerChain.php +++ b/lib/Doctrine/DBAL/Logging/LoggerChain.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL\Logging; +use Doctrine\Deprecations\Deprecation; + /** * Chains multiple SQLLogger. */ @@ -27,6 +29,12 @@ public function __construct(array $loggers = []) */ public function addLogger(SQLLogger $logger) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/3572', + 'LoggerChain::addLogger() is deprecated, use LoggerChain constructor instead.' + ); + $this->loggers[] = $logger; }