Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 3 and MonologBundle - DebugHandlerPass vs AddDebugLogProcessorPass

I've found this PHP message in the symfony log :

php.INFO: The Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass class is deprecated since version 2.12 and will be removed in 3.0. Use AddDebugLogProcessorPass in FrameworkBundle instead. {"type":16384, "file":"/mnt/400Go/www/sy1/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php", "line":14, "level":28928, "stack":[...]

I'm using symfony 3.1.15 and Monolog 2.8+... So the thing should already be removed, no ?

I can see the messages within the DebugHandlerPass class in /vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php

In /vendor/symfony/monolog-bundle/MonologBundle.php, there are two lines calling the DebugHandlerPass class :

use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass;

$container->addCompilerPass(new DebugHandlerPass($channelPass));

But nowhere in the PHP files is a AddDebugLogProcessorPass class...

Maybe a version mismatch. If anyone could give me a hint, that would be great.

Best regards,

MC

like image 354
mc62 Avatar asked Nov 08 '16 20:11

mc62


2 Answers

Just update your "symfony/monolog-bundle" dependency to the latest 3.0 version, and it will do the trick ;)

https://packagist.org/packages/symfony/monolog-bundle

Regards,

like image 64
Laurent Brieu Avatar answered Oct 20 '22 00:10

Laurent Brieu


There is a pending Pull Request, see https://github.com/symfony/monolog-bundle/pull/188. As soon as such PR will be merged, the deprecation INFO message will disappear.

like image 33
Massimiliano Arione Avatar answered Oct 20 '22 00:10

Massimiliano Arione