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 6, 2021
1 parent 121133a commit 8c5ce29
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 8c5ce29

Please sign in to comment.