浏览代码

Merge branch 'master' into new-asset

Conflicts:
	apps/basic/composer.json
	composer.json
Qiang Xue 11 年之前
父节点
当前提交
1b58a71ef9
共有 3 个文件被更改,包括 21 次插入21 次删除
  1. 16 15
      composer.json
  2. 4 1
      config/console.php
  3. 1 5
      config/web.php

+ 16 - 15
composer.json

@@ -25,26 +25,27 @@
         "yiisoft/yii2-gii": "*",
         "yiisoft/yii2-faker": "*"
     },
+    "config": {
+        "process-timeout": 1800
+    },
     "scripts": {
         "post-create-project-cmd": [
-            "yii\\composer\\Installer::setPermission",
-            "yii\\composer\\Installer::generateCookieValidationKey"
+            "yii\\composer\\Installer::postCreateProject"
         ]
     },
-    "config": {
-        "process-timeout": 1800
-    },
     "extra": {
-        "writable": [
-            "runtime",
-            "web/assets"
-        ],
-        "executable": [
-            "yii"
-        ],
-        "config": [
-            "config/web.php"
-        ],
+        "yii\\composer\\Installer::postCreateProject": {
+            "setPermission": [
+                {
+                    "runtime": "0777",
+                    "web/assets": "0777",
+                    "yii": "0755"
+                }
+            ],
+            "generateCookieValidationKey": [
+                "config/web.php"
+            ]
+        },
         "asset-installer-paths": {
             "npm-asset-library": "vendor/npm",
             "bower-asset-library": "vendor/bower"

+ 4 - 1
config/console.php

@@ -8,8 +8,11 @@ $db = require(__DIR__ . '/db.php');
 return [
     'id' => 'basic-console',
     'basePath' => dirname(__DIR__),
-    'bootstrap' => ['log'],
+    'bootstrap' => ['log', 'gii'],
     'controllerNamespace' => 'app\commands',
+    'modules' => [
+        'gii' => 'yii\gii\Module',
+    ],
     'components' => [
         'cache' => [
             'class' => 'yii\caching\FileCache',

+ 1 - 5
config/web.php

@@ -9,7 +9,7 @@ $config = [
     'components' => [
         'request' => [
             // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
-            'cookieValidationKey' => 'thisIsAKey',
+            'cookieValidationKey' => '',
         ],
         'cache' => [
             'class' => 'yii\caching\FileCache',
@@ -38,10 +38,6 @@ $config = [
             ],
         ],
         'db' => require(__DIR__ . '/db.php'),
-        'urlManager' => [
-            'enablePrettyUrl' => true,
-            'showScriptName' => false,
-        ],
     ],
     'params' => $params,
 ];