我有以下新环境:
<?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
怎么可能是真的('mobile'false);
我已经清除了缓存,但它仍然是相同的
当我执行以下操作时:
$kernel = $this->get('kernel');
ladybug_dump($kernel->isDebug());
这会返回false,但这只是控制台命令没有正确
答案 0 :(得分:0)
sudo php app/console assetic:dump --env=dev --no-debug