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


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

>我有以下新环境:

<?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);

但是当我执行以下操作时:

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

它给了我:

Clearing the cache for the mobile environment with debug true

当我专门在新的 AppKernel("移动"错误)中特别设置时,debug怎么可能设置为 true;

我已经清除了缓存和所有内容,但它仍然是一样的

当我执行以下操作时:

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

这返回 false,但只是控制台命令没有正确

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