Skip to content

Commit aeb81e3

Browse files
committed
Merge branch 'master' into full
# Conflicts: # README.md # composer.json # src/config/modules.php
2 parents 5e0977c + a44987b commit aeb81e3

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

composer.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,29 @@
1313
},
1414
"minimum-stability": "dev",
1515
"require": {
16-
"php": ">=5.4.0",
17-
"yiisoft/yii2": ">=2.0.4",
18-
"yiisoft/yii2-bootstrap": "*",
19-
"yiisoft/yii2-swiftmailer": "*",
16+
"php": ">=5.5.0",
17+
"yiisoft/yii2": ">=2.0.13",
18+
"yiisoft/yii2-bootstrap": "^2.0",
19+
"yiisoft/yii2-swiftmailer": "^2.0",
2020
"vlucas/phpdotenv": "~1.0@dev",
21-
"nullref/yii2-useful": "dev-master",
22-
"nullref/yii2-core": "dev-master",
21+
"nullref/yii2-useful": ">=0.0.4",
22+
"nullref/yii2-core": ">=0.0.3",
23+
"nullref/yii2-admin": ">=0.0.2"
2324
"nullref/yii2-full-admin": "dev-master",
2425
"yiisoft/yii2-shell": "^2.0"
2526
},
2627
"require-dev": {
27-
"yiisoft/yii2-codeception": "*",
28+
"codeception/codeception": "^2.2",
2829
"yiisoft/yii2-debug": "*",
2930
"yiisoft/yii2-gii": "*",
3031
"yiisoft/yii2-faker": "*"
3132
},
33+
"repositories": [
34+
{
35+
"type": "composer",
36+
"url": "https://asset-packagist.org"
37+
}
38+
],
3239
"config": {
3340
"process-timeout": 1800,
3441
"sort-packages": true,

src/config/console.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
$params = require(__DIR__ . '/params.php');
44
$modules = require(__DIR__ . '/modules.php');
55

6-
Yii::setAlias('@webroot', dirname(dirname(__DIR__)) . '/web');
76

87
return [
98
'id' => 'console-app',
@@ -13,6 +12,11 @@
1312
'bootstrap' => ['log', 'core'],
1413
'modules' => $modules,
1514
'params' => $params,
15+
'aliases' => [
16+
'@bower' => '@vendor/bower-asset',
17+
'@npm' => '@vendor/npm-asset',
18+
'@webroot' => dirname(dirname(__DIR__)) . '/web',
19+
],
1620
'components' => [
1721
'db' => require(__DIR__ . '/db.php'),
1822
]

src/config/web.php

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
1111
'runtimePath' => dirname(dirname(__DIR__)) . '/runtime',
1212
'bootstrap' => ['log'],
13+
'aliases' => [
14+
'@bower' => '@vendor/bower-asset',
15+
'@npm' => '@vendor/npm-asset',
16+
],
1317
'components' => [
1418
'formatter' => [
1519
'class' => 'app\components\Formatter',

src/controllers/SiteController.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace app\controllers;
44

5-
use Yii;
65
use yii\filters\VerbFilter;
76
use yii\web\Controller;
87

@@ -13,7 +12,7 @@ public function behaviors()
1312
{
1413
return [
1514
'verbs' => [
16-
'class' => VerbFilter::className(),
15+
'class' => VerbFilter::class,
1716
'actions' => [
1817
'logout' => ['post'],
1918
],

web/index.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
Dotenv::required(['DB_HOST', 'DB_NAME', 'DB_USER', 'DB_PASS', 'YII_DEBUG', 'YII_MAIL_USE_FILE_TRANSPORT']);
77

88
defined('YII_DEBUG') or define('YII_DEBUG', getenv('YII_DEBUG') != 'false');
9+
defined('YII_CLI') or define('YII_CLI', false);
910
defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV'));
1011
defined('YII_MAIL_USE_FILE_TRANSPORT') or define('YII_MAIL_USE_FILE_TRANSPORT', getenv('YII_MAIL_USE_FILE_TRANSPORT') == 'true');
1112

1213
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
1314

1415
$config = require(__DIR__ . '/../src/config/web.php');
15-
(new yii\web\Application($config))->run();
16+
(new \yii\web\Application($config))->run();

yii

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @license http://www.yiiframework.com/license/
99
*/
1010

11+
defined('YII_CLI') or define('YII_CLI', true);
1112
defined('YII_DEBUG') or define('YII_DEBUG', true);
1213

1314
// fcgi doesn't have STDIN and STDOUT defined by default

0 commit comments

Comments
 (0)