Skip to content

Commit

Permalink
[doctrineGH-3572] Deprecation trigger for LoggerChain::addLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 27, 2021
1 parent f3e971a commit 7f777ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Doctrine/DBAL/Logging/LoggerChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Doctrine\DBAL\Logging;

use Doctrine\Deprecations\Deprecation;

/**
* Chains multiple SQLLogger.
*/
Expand All @@ -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;
}

Expand Down

0 comments on commit 7f777ae

Please sign in to comment.