remove gii module in production

This commit is contained in:
Daniel Gomez Pan 2015-09-08 23:18:39 +02:00
parent 4cedb4db03
commit f60f7647c5

View File

@ -5,14 +5,11 @@ Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
$params = require(__DIR__ . '/params.php'); $params = require(__DIR__ . '/params.php');
$db = require(__DIR__ . '/db.php'); $db = require(__DIR__ . '/db.php');
return [ $config = [
'id' => 'basic-console', 'id' => 'basic-console',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'bootstrap' => ['log', 'gii'], 'bootstrap' => ['log'],
'controllerNamespace' => 'app\commands', 'controllerNamespace' => 'app\commands',
'modules' => [
'gii' => 'yii\gii\Module',
],
'components' => [ 'components' => [
'cache' => [ 'cache' => [
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
@ -29,3 +26,11 @@ return [
], ],
'params' => $params, 'params' => $params,
]; ];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
}