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
|
Reference in New Issue
Block a user