Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 1c71802

Browse files
committed
merged branch fabpot/debug-component (PR #523)
This PR was merged into the master branch. Discussion ---------- made changes needed for the introduction of the Debug component Commits ------- 494543e made changes needed for the introduction of the Debug component
2 parents 82de393 + 494543e commit 1c71802

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/console

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ require_once __DIR__.'/AppKernel.php';
1212

1313
use Symfony\Bundle\FrameworkBundle\Console\Application;
1414
use Symfony\Component\Console\Input\ArgvInput;
15+
use Symfony\Component\Debug\Debug;
1516

1617
$input = new ArgvInput();
1718
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
1819
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
1920

21+
if ($debug) {
22+
Debug::enable();
23+
}
24+
2025
$kernel = new AppKernel($env, $debug);
2126
$application = new Application($kernel);
2227
$application->run($input);

web/app_dev.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use Symfony\Component\HttpFoundation\Request;
4+
use Symfony\Component\Debug\Debug;
45

56
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
67
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
@@ -17,6 +18,8 @@
1718
}
1819

1920
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
21+
Debug::enable();
22+
2023
require_once __DIR__.'/../app/AppKernel.php';
2124

2225
$kernel = new AppKernel('dev', true);

0 commit comments

Comments
 (0)