mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-23 22:32:11 +01:00
Enable Debug for dev only
Because doctrine/static-website-generator has a dependency to symfony/http-kernel that installs symfony/error-handler as a no-dev dependency, the Debug class is always available and enables Debug mode even in prod.
This commit is contained in:
@@ -10,7 +10,7 @@ use Symfony\Component\ErrorHandler\Debug;
|
||||
$input = new ArgvInput();
|
||||
$env = $input->getParameterOption(['--env', '-e'], 'dev');
|
||||
|
||||
if (class_exists(Debug::class)) {
|
||||
if (class_exists(Debug::class) && $env === 'dev') {
|
||||
Debug::enable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user