简体   繁体   English

关闭调试模式的新环境仍将kernel.debug检测为true

[英]new environment with debug mode off still detects kernel.debug as true

I have the following new environment: 我有以下新环境:

<?php

use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance
// Change 'sf2' by the prefix you want in order to prevent key conflict with another application
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
*/

require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';
$kernel = new AppKernel('mobile', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

however when I do the following: 但是,当我执行以下操作时:

sudo php app/console assetic:dump --env=mobile

it gives me: 它给了我:

Clearing the cache for the mobile environment with debug true

How is it possible that debug is set to true while I have specifically in the new AppKernel('mobile' false); 我专门在新的AppKernel中将debug设置为true的可能性('mobile'false);

I have cleared the cache and everything but it is still the same 我已经清除了缓存和所有内容,但还是一样

When I do the following: 当我执行以下操作时:

 $kernel = $this->get('kernel');
    ladybug_dump($kernel->isDebug());

this returns false, however it's just the console command that is not getting it right 这将返回false,但是只是控制台命令无法正确处理

sudo php app/console assetic:dump --env=dev --no-debug

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM