-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
composer.json:
{
"require": {
"symfony/monolog-bridge": "~2.4",
"symfony/console": "~2.3",
"monolog/monolog": "*",
}
}
Code:
<?php
require __DIR__ . '/vendor/autoload.php';
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
$output->setVerbosity(Symfony\Component\Console\Output\OutputInterface::VERBOSITY_DEBUG);
$monolog = new Monolog\Logger('Instance');
$monolog->pushHandler(new \Symfony\Bridge\Monolog\Handler\ConsoleHandler($output));
Error:
PHP Fatal error: Interface 'Symfony\Component\EventDispatcher\EventSubscriberInterface' not found in /vendor/symfony/monolog-bridge/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php on line 42
PHP Stack trace:
PHP 1. {main}() run.php:0
PHP 2. Composer\Autoload\ClassLoader->loadClass() run.php:0
PHP 3. include() /vendor/composer/ClassLoader.php:185
I believe the fix is to include "symfony/event-dispatcher": "~2.2"
in the composer.json for MonologBridge. I'm happy to submit this as a PR, but am not too familiar with your rules.