Skip to content

Commit

Permalink
[HttpKernel] avoid loading a class that's not-needed when doing HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Oct 1, 2016
1 parent 8371b50 commit 16489d6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -137,7 +137,7 @@ public static function getSubscribedEvents()
{
$events = array(KernelEvents::REQUEST => array('configure', 2048));

if (defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
if ('cli' === php_sapi_name() && defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
$events[ConsoleEvents::COMMAND] = array('configure', 2048);
}

Expand Down

0 comments on commit 16489d6

Please sign in to comment.