From fb1d9fa32a2fb2e2554f47b3ac710fa96a9ca00b Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sat, 19 Jul 2014 14:56:31 -0400 Subject: [PATCH] `yii\web\Request::cookieValidationKey` is now automatically generated by the installation script for the basic and advanced application templates --- composer.json | 98 ++++++++++++++++++++++++++------------------------ config/web.php | 4 +++ 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/composer.json b/composer.json index d9d0b11..a21128b 100644 --- a/composer.json +++ b/composer.json @@ -1,49 +1,53 @@ { - "name": "yiisoft/yii2-app-basic", - "description": "Yii 2 Basic Application Template", - "keywords": ["yii2", "framework", "basic", "application template"], - "homepage": "http://www.yiiframework.com/", - "type": "project", - "license": "BSD-3-Clause", - "support": { - "issues": "https://github.com/yiisoft/yii2/issues?state=open", - "forum": "http://www.yiiframework.com/forum/", - "wiki": "http://www.yiiframework.com/wiki/", - "irc": "irc://irc.freenode.net/yii", - "source": "https://github.com/yiisoft/yii2" - }, - "minimum-stability": "dev", - "require": { - "php": ">=5.4.0", - "yiisoft/yii2": "*", - "yiisoft/yii2-bootstrap": "*", - "yiisoft/yii2-swiftmailer": "*" - }, - "require-dev": { - "yiisoft/yii2-codeception": "*", - "yiisoft/yii2-debug": "*", - "yiisoft/yii2-gii": "*" - }, - "suggest": { - "codeception/codeception": "Codeception, 2.0.* is currently works well with Yii.", - "codeception/specify": "BDD style code blocks for PHPUnit and Codeception", - "codeception/verify": "BDD Assertions for PHPUnit and Codeception" - }, - "scripts": { - "post-create-project-cmd": [ - "yii\\composer\\Installer::setPermission" - ] - }, - "config": { - "process-timeout": 1800 - }, - "extra": { - "writable": [ - "runtime", - "web/assets" - ], - "executable": [ - "yii" - ] - } + "name": "yiisoft/yii2-app-basic", + "description": "Yii 2 Basic Application Template", + "keywords": ["yii2", "framework", "basic", "application template"], + "homepage": "http://www.yiiframework.com/", + "type": "project", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + "require": { + "php": ">=5.4.0", + "yiisoft/yii2": "*", + "yiisoft/yii2-bootstrap": "*", + "yiisoft/yii2-swiftmailer": "*" + }, + "require-dev": { + "yiisoft/yii2-codeception": "*", + "yiisoft/yii2-debug": "*", + "yiisoft/yii2-gii": "*" + }, + "suggest": { + "codeception/codeception": "Codeception, 2.0.* is currently works well with Yii.", + "codeception/specify": "BDD style code blocks for PHPUnit and Codeception", + "codeception/verify": "BDD Assertions for PHPUnit and Codeception" + }, + "scripts": { + "post-create-project-cmd": [ + "yii\\composer\\Installer::setPermission", + "yii\\composer\\Installer::generateCookieValidationKey" + ] + }, + "config": { + "process-timeout": 1800 + }, + "extra": { + "writable": [ + "runtime", + "web/assets" + ], + "executable": [ + "yii" + ], + "config": [ + "config/web.php" + ] + } } diff --git a/config/web.php b/config/web.php index 7939bb3..7939437 100644 --- a/config/web.php +++ b/config/web.php @@ -7,6 +7,10 @@ $config = [ 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => [ + 'request' => [ + // a secret key used to validate cookies. You may modify this key with your own one. + 'cookieValidationKey' => '', + ], 'cache' => [ 'class' => 'yii\caching\FileCache', ],