-
Notifications
You must be signed in to change notification settings - Fork 0
/
yii
executable file
·28 lines (24 loc) · 905 Bytes
/
yii
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env php
<?php
declare(strict_types=1);
use Yiisoft\Config\Config;
use Yiisoft\Config\ConfigPaths;
use Yiisoft\Config\Modifier\RecursiveMerge;
use Yiisoft\Config\Modifier\RemoveFromVendor;
use Yiisoft\Config\Modifier\ReverseMerge;
use Yiisoft\Yii\Runner\Console\ConsoleApplicationRunner;
require_once __DIR__ . '/preload.php';
// Run console application runner
(new ConsoleApplicationRunner(__DIR__, $_ENV['YII_DEBUG'], false, $_SERVER['YII_ENV']))
->withConfig(
new Config(
new ConfigPaths(__DIR__, 'config'),
$_SERVER['YII_ENV'],
[
ReverseMerge::groups('events', 'events-web', 'events-console'),
RecursiveMerge::groups('params', 'events', 'events-web', 'events-console'),
RemoveFromVendor::keys(['yiisoft/log-target-file', 'fileTarget', 'levels']),
],
)
)
->run();