[英]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的可能性('mobile'false);
我已經清除了緩存和所有內容,但還是一樣
當我執行以下操作時:
$kernel = $this->get('kernel');
ladybug_dump($kernel->isDebug());
這將返回false,但是只是控制台命令無法正確處理
sudo php app/console assetic:dump --env=dev --no-debug
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.