Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yiisoft/yii2
Browse files Browse the repository at this point in the history
  • Loading branch information
RichWeber committed Aug 3, 2014
2 parents 9fa9dee + f0fefbb commit d5bd681
Show file tree
Hide file tree
Showing 32 changed files with 646 additions and 258 deletions.
4 changes: 0 additions & 4 deletions apps/advanced/backend/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
'bootstrap' => ['log'],
'modules' => [],
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
Expand Down
7 changes: 1 addition & 6 deletions apps/advanced/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::setPermission",
"yii\\composer\\Installer::generateCookieValidationKey"
"yii\\composer\\Installer::setPermission"
]
},
"config": {
Expand All @@ -46,10 +45,6 @@

"frontend/runtime",
"frontend/web/assets"
],
"config": [
"frontend/config/main.php",
"backend/config/main.php"
]
}
}
9 changes: 8 additions & 1 deletion apps/advanced/environments/dev/backend/config/main-local.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?php

$config = [];
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
],
];

if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<?php

$config = [];
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
],
];

if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
Expand Down
24 changes: 19 additions & 5 deletions apps/advanced/environments/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,50 @@
* return [
* 'environment name' => [
* 'path' => 'directory storing the local files',
* 'writable' => [
* 'setWritable' => [
* // list of directories that should be set writable
* ],
* 'setExecutable' => [
* // list of directories that should be set executable
* ],
* 'setCookieValidationKey' => [
* // list of config files that need to be inserted with automatically generated cookie validation keys
* ],
* ],
* ];
* ```
*/
return [
'Development' => [
'path' => 'dev',
'writable' => [
'setWritable' => [
'backend/runtime',
'backend/web/assets',
'frontend/runtime',
'frontend/web/assets',
],
'executable' => [
'setExecutable' => [
'yii',
],
'setCookieValidationKey' => [
'backend/config/main-local.php',
'frontend/config/main-local.php',
],
],
'Production' => [
'path' => 'prod',
'writable' => [
'setWritable' => [
'backend/runtime',
'backend/web/assets',
'frontend/runtime',
'frontend/web/assets',
],
'executable' => [
'setExecutable' => [
'yii',
],
'setCookieValidationKey' => [
'backend/config/main-local.php',
'frontend/config/main-local.php',
],
],
];
6 changes: 6 additions & 0 deletions apps/advanced/environments/prod/backend/config/main-local.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<?php
return [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
],
];
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<?php
return [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
],
];
4 changes: 0 additions & 4 deletions apps/advanced/frontend/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
'bootstrap' => ['log'],
'controllerNamespace' => 'frontend\controllers',
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
],
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
Expand Down
Loading

0 comments on commit d5bd681

Please sign in to comment.