first commit
This commit is contained in:
11
environments/dev/backend/config/codeception-local.php
Executable file
11
environments/dev/backend/config/codeception-local.php
Executable file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require dirname(dirname(__DIR__)) . '/common/config/codeception-local.php',
|
||||
require __DIR__ . '/main.php',
|
||||
require __DIR__ . '/main-local.php',
|
||||
require __DIR__ . '/test.php',
|
||||
require __DIR__ . '/test-local.php',
|
||||
[
|
||||
]
|
||||
);
|
25
environments/dev/backend/config/main-local.php
Executable file
25
environments/dev/backend/config/main-local.php
Executable file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$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
|
||||
$config['bootstrap'][] = 'debug';
|
||||
$config['modules']['debug'] = [
|
||||
'class' => \yii\debug\Module::class,
|
||||
];
|
||||
|
||||
$config['bootstrap'][] = 'gii';
|
||||
$config['modules']['gii'] = [
|
||||
'class' => \yii\gii\Module::class,
|
||||
];
|
||||
}
|
||||
|
||||
return $config;
|
4
environments/dev/backend/config/params-local.php
Executable file
4
environments/dev/backend/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
4
environments/dev/backend/config/test-local.php
Executable file
4
environments/dev/backend/config/test-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
27
environments/dev/backend/web/index-test.php
Executable file
27
environments/dev/backend/web/index-test.php
Executable file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
// NOTE: Make sure this file is not accessible when deployed to production
|
||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
|
||||
die('You are not allowed to access this file.');
|
||||
}
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../../common/config/test.php',
|
||||
require __DIR__ . '/../../common/config/test-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php',
|
||||
require __DIR__ . '/../config/test.php',
|
||||
require __DIR__ . '/../config/test-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
18
environments/dev/backend/web/index.php
Executable file
18
environments/dev/backend/web/index.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
2
environments/dev/backend/web/robots.txt
Executable file
2
environments/dev/backend/web/robots.txt
Executable file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
16
environments/dev/common/config/codeception-local.php
Executable file
16
environments/dev/common/config/codeception-local.php
Executable file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/main.php',
|
||||
require __DIR__ . '/main-local.php',
|
||||
require __DIR__ . '/test.php',
|
||||
require __DIR__ . '/test-local.php',
|
||||
[
|
||||
'components' => [
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => '',
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
43
environments/dev/common/config/main-local.php
Executable file
43
environments/dev/common/config/main-local.php
Executable file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'class' => \yii\db\Connection::class,
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
],
|
||||
'mailer' => [
|
||||
'class' => \yii\symfonymailer\Mailer::class,
|
||||
'viewPath' => '@common/mail',
|
||||
// send all mails to a file by default.
|
||||
'useFileTransport' => true,
|
||||
// You have to set
|
||||
//
|
||||
// 'useFileTransport' => false,
|
||||
//
|
||||
// and configure a transport for the mailer to send real emails.
|
||||
//
|
||||
// SMTP server example:
|
||||
// 'transport' => [
|
||||
// 'scheme' => 'smtps',
|
||||
// 'host' => '',
|
||||
// 'username' => '',
|
||||
// 'password' => '',
|
||||
// 'port' => 465,
|
||||
// 'dsn' => 'native://default',
|
||||
// ],
|
||||
//
|
||||
// DSN example:
|
||||
// 'transport' => [
|
||||
// 'dsn' => 'smtp://user:pass@smtp.example.com:25',
|
||||
// ],
|
||||
//
|
||||
// See: https://symfony.com/doc/current/mailer.html#using-built-in-transports
|
||||
// Or if you use a 3rd party service, see:
|
||||
// https://symfony.com/doc/current/mailer.html#using-a-3rd-party-transport
|
||||
],
|
||||
],
|
||||
];
|
4
environments/dev/common/config/params-local.php
Executable file
4
environments/dev/common/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
9
environments/dev/common/config/test-local.php
Executable file
9
environments/dev/common/config/test-local.php
Executable file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2advanced_test',
|
||||
],
|
||||
],
|
||||
];
|
8
environments/dev/console/config/main-local.php
Executable file
8
environments/dev/console/config/main-local.php
Executable file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'bootstrap' => ['gii'],
|
||||
'modules' => [
|
||||
'gii' => 'yii\gii\Module',
|
||||
],
|
||||
];
|
4
environments/dev/console/config/params-local.php
Executable file
4
environments/dev/console/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
4
environments/dev/console/config/test-local.php
Executable file
4
environments/dev/console/config/test-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
11
environments/dev/frontend/config/codeception-local.php
Executable file
11
environments/dev/frontend/config/codeception-local.php
Executable file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require dirname(dirname(__DIR__)) . '/common/config/codeception-local.php',
|
||||
require __DIR__ . '/main.php',
|
||||
require __DIR__ . '/main-local.php',
|
||||
require __DIR__ . '/test.php',
|
||||
require __DIR__ . '/test-local.php',
|
||||
[
|
||||
]
|
||||
);
|
25
environments/dev/frontend/config/main-local.php
Executable file
25
environments/dev/frontend/config/main-local.php
Executable file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$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
|
||||
$config['bootstrap'][] = 'debug';
|
||||
$config['modules']['debug'] = [
|
||||
'class' => \yii\debug\Module::class,
|
||||
];
|
||||
|
||||
$config['bootstrap'][] = 'gii';
|
||||
$config['modules']['gii'] = [
|
||||
'class' => \yii\gii\Module::class,
|
||||
];
|
||||
}
|
||||
|
||||
return $config;
|
4
environments/dev/frontend/config/params-local.php
Executable file
4
environments/dev/frontend/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
4
environments/dev/frontend/config/test-local.php
Executable file
4
environments/dev/frontend/config/test-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
28
environments/dev/frontend/web/index-test.php
Executable file
28
environments/dev/frontend/web/index-test.php
Executable file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// NOTE: Make sure this file is not accessible when deployed to production
|
||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
|
||||
die('You are not allowed to access this file.');
|
||||
}
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../../common/config/test.php',
|
||||
require __DIR__ . '/../../common/config/test-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php',
|
||||
require __DIR__ . '/../config/test.php',
|
||||
require __DIR__ . '/../config/test-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
18
environments/dev/frontend/web/index.php
Executable file
18
environments/dev/frontend/web/index.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
2
environments/dev/frontend/web/robots.txt
Executable file
2
environments/dev/frontend/web/robots.txt
Executable file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
24
environments/dev/yii
Executable file
24
environments/dev/yii
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Yii console bootstrap file.
|
||||
*/
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/common/config/bootstrap.php';
|
||||
require __DIR__ . '/console/config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/common/config/main.php',
|
||||
require __DIR__ . '/common/config/main-local.php',
|
||||
require __DIR__ . '/console/config/main.php',
|
||||
require __DIR__ . '/console/config/main-local.php'
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
28
environments/dev/yii_test
Executable file
28
environments/dev/yii_test
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Yii console bootstrap file.
|
||||
*/
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/common/config/bootstrap.php';
|
||||
require __DIR__ . '/console/config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/common/config/main.php',
|
||||
require __DIR__ . '/common/config/main-local.php',
|
||||
require __DIR__ . '/common/config/test.php',
|
||||
require __DIR__ . '/common/config/test-local.php',
|
||||
require __DIR__ . '/console/config/main.php',
|
||||
require __DIR__ . '/console/config/main-local.php',
|
||||
require __DIR__ . '/console/config/test.php',
|
||||
require __DIR__ . '/console/config/test-local.php'
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
15
environments/dev/yii_test.bat
Executable file
15
environments/dev/yii_test.bat
Executable file
@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
|
||||
rem -------------------------------------------------------------
|
||||
rem Yii command line bootstrap script for Windows.
|
||||
rem -------------------------------------------------------------
|
||||
|
||||
@setlocal
|
||||
|
||||
set YII_PATH=%~dp0
|
||||
|
||||
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
|
||||
|
||||
"%PHP_COMMAND%" "%YII_PATH%yii_test" %*
|
||||
|
||||
@endlocal
|
68
environments/index.php
Executable file
68
environments/index.php
Executable file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* The manifest of files that are local to specific environment.
|
||||
* This file returns a list of environments that the application
|
||||
* may be installed under. The returned data must be in the following
|
||||
* format:
|
||||
*
|
||||
* ```php
|
||||
* return [
|
||||
* 'environment name' => [
|
||||
* 'path' => 'directory storing the local files',
|
||||
* 'skipFiles' => [
|
||||
* // list of files that should only be copied once and skipped if they already exist
|
||||
* ],
|
||||
* 'setWritable' => [
|
||||
* // list of directories that should be set writable
|
||||
* ],
|
||||
* 'setExecutable' => [
|
||||
* // list of files that should be set executable
|
||||
* ],
|
||||
* 'setCookieValidationKey' => [
|
||||
* // list of config files that need to be inserted with automatically generated cookie validation keys
|
||||
* ],
|
||||
* 'createSymlink' => [
|
||||
* // list of symlinks to be created. Keys are symlinks, and values are the targets.
|
||||
* ],
|
||||
* ],
|
||||
* ];
|
||||
* ```
|
||||
*/
|
||||
return [
|
||||
'Development' => [
|
||||
'path' => 'dev',
|
||||
'setWritable' => [
|
||||
'backend/runtime',
|
||||
'backend/web/assets',
|
||||
'console/runtime',
|
||||
'frontend/runtime',
|
||||
'frontend/web/assets',
|
||||
],
|
||||
'setExecutable' => [
|
||||
'yii',
|
||||
'yii_test',
|
||||
],
|
||||
'setCookieValidationKey' => [
|
||||
'backend/config/main-local.php',
|
||||
'common/config/codeception-local.php',
|
||||
'frontend/config/main-local.php',
|
||||
],
|
||||
],
|
||||
'Production' => [
|
||||
'path' => 'prod',
|
||||
'setWritable' => [
|
||||
'backend/runtime',
|
||||
'backend/web/assets',
|
||||
'console/runtime',
|
||||
'frontend/runtime',
|
||||
'frontend/web/assets',
|
||||
],
|
||||
'setExecutable' => [
|
||||
'yii',
|
||||
],
|
||||
'setCookieValidationKey' => [
|
||||
'backend/config/main-local.php',
|
||||
'frontend/config/main-local.php',
|
||||
],
|
||||
],
|
||||
];
|
10
environments/prod/backend/config/main-local.php
Executable file
10
environments/prod/backend/config/main-local.php
Executable file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => '',
|
||||
],
|
||||
],
|
||||
];
|
4
environments/prod/backend/config/params-local.php
Executable file
4
environments/prod/backend/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
18
environments/prod/backend/web/index.php
Executable file
18
environments/prod/backend/web/index.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', false);
|
||||
defined('YII_ENV') or define('YII_ENV', 'prod');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
2
environments/prod/backend/web/robots.txt
Executable file
2
environments/prod/backend/web/robots.txt
Executable file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
17
environments/prod/common/config/main-local.php
Executable file
17
environments/prod/common/config/main-local.php
Executable file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'class' => \yii\db\Connection::class,
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
],
|
||||
'mailer' => [
|
||||
'class' => \yii\symfonymailer\Mailer::class,
|
||||
'viewPath' => '@common/mail',
|
||||
],
|
||||
],
|
||||
];
|
4
environments/prod/common/config/params-local.php
Executable file
4
environments/prod/common/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
4
environments/prod/console/config/main-local.php
Executable file
4
environments/prod/console/config/main-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
4
environments/prod/console/config/params-local.php
Executable file
4
environments/prod/console/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
10
environments/prod/frontend/config/main-local.php
Executable file
10
environments/prod/frontend/config/main-local.php
Executable file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'components' => [
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => '',
|
||||
],
|
||||
],
|
||||
];
|
4
environments/prod/frontend/config/params-local.php
Executable file
4
environments/prod/frontend/config/params-local.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
18
environments/prod/frontend/web/index.php
Executable file
18
environments/prod/frontend/web/index.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', false);
|
||||
defined('YII_ENV') or define('YII_ENV', 'prod');
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||
require __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/../../common/config/main.php',
|
||||
require __DIR__ . '/../../common/config/main-local.php',
|
||||
require __DIR__ . '/../config/main.php',
|
||||
require __DIR__ . '/../config/main-local.php'
|
||||
);
|
||||
|
||||
(new yii\web\Application($config))->run();
|
2
environments/prod/frontend/web/robots.txt
Executable file
2
environments/prod/frontend/web/robots.txt
Executable file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Allow: /
|
24
environments/prod/yii
Executable file
24
environments/prod/yii
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Yii console bootstrap file.
|
||||
*/
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', false);
|
||||
defined('YII_ENV') or define('YII_ENV', 'prod');
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
require __DIR__ . '/common/config/bootstrap.php';
|
||||
require __DIR__ . '/console/config/bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require __DIR__ . '/common/config/main.php',
|
||||
require __DIR__ . '/common/config/main-local.php',
|
||||
require __DIR__ . '/console/config/main.php',
|
||||
require __DIR__ . '/console/config/main-local.php'
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
Reference in New Issue
Block a user