Skip to content

Commit 9e918d0

Browse files
committed
[doctrineGH-3572] Deprecation trigger for LoggerChain::addLogger
1 parent 8dc2273 commit 9e918d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Doctrine/DBAL/Logging/LoggerChain.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Doctrine\DBAL\Logging;
44

5+
use Doctrine\Deprecations\Deprecation;
6+
57
/**
68
* Chains multiple SQLLogger.
79
*/
@@ -27,6 +29,12 @@ public function __construct(array $loggers = [])
2729
*/
2830
public function addLogger(SQLLogger $logger)
2931
{
32+
Deprecation::trigger(
33+
'doctrine/dbal',
34+
'https://github.com/doctrine/dbal/pull/3572',
35+
'LoggerChain::addLogger() is deprecated, use LoggerChain constructor instead.'
36+
);
37+
3038
$this->loggers[] = $logger;
3139
}
3240

0 commit comments

Comments
 (0)