yii\web\Request::cookieValidationKey is now automatically generated by the installation script for the basic and advanced application templates

This commit is contained in:
Qiang Xue 2014-07-19 14:56:31 -04:00
parent 539a6f0c59
commit fb1d9fa32a
2 changed files with 55 additions and 47 deletions

View File

@ -1,49 +1,53 @@
{ {
"name": "yiisoft/yii2-app-basic", "name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Application Template", "description": "Yii 2 Basic Application Template",
"keywords": ["yii2", "framework", "basic", "application template"], "keywords": ["yii2", "framework", "basic", "application template"],
"homepage": "http://www.yiiframework.com/", "homepage": "http://www.yiiframework.com/",
"type": "project", "type": "project",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"support": { "support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open", "issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/", "forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/", "wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii", "irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2" "source": "https://github.com/yiisoft/yii2"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
"yiisoft/yii2": "*", "yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*" "yiisoft/yii2-swiftmailer": "*"
}, },
"require-dev": { "require-dev": {
"yiisoft/yii2-codeception": "*", "yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*", "yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*" "yiisoft/yii2-gii": "*"
}, },
"suggest": { "suggest": {
"codeception/codeception": "Codeception, 2.0.* is currently works well with Yii.", "codeception/codeception": "Codeception, 2.0.* is currently works well with Yii.",
"codeception/specify": "BDD style code blocks for PHPUnit and Codeception", "codeception/specify": "BDD style code blocks for PHPUnit and Codeception",
"codeception/verify": "BDD Assertions for PHPUnit and Codeception" "codeception/verify": "BDD Assertions for PHPUnit and Codeception"
}, },
"scripts": { "scripts": {
"post-create-project-cmd": [ "post-create-project-cmd": [
"yii\\composer\\Installer::setPermission" "yii\\composer\\Installer::setPermission",
] "yii\\composer\\Installer::generateCookieValidationKey"
}, ]
"config": { },
"process-timeout": 1800 "config": {
}, "process-timeout": 1800
"extra": { },
"writable": [ "extra": {
"runtime", "writable": [
"web/assets" "runtime",
], "web/assets"
"executable": [ ],
"yii" "executable": [
] "yii"
} ],
"config": [
"config/web.php"
]
}
} }

View File

@ -7,6 +7,10 @@ $config = [
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'bootstrap' => ['log'], 'bootstrap' => ['log'],
'components' => [ 'components' => [
'request' => [
// a secret key used to validate cookies. You may modify this key with your own one.
'cookieValidationKey' => '',
],
'cache' => [ 'cache' => [
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
], ],