mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
1f8a53f6bb
* Improve Debug Mode Handling * Improve Debug Mode Handling * Improve Debug Mode Handling * Improve Debug Mode Handling * Improve Debug Mode Handling * Autocommit PHP CS Fixer * Improve Debug Mode Handling * Autocommit PHP CS Fixer * Improve Debug Mode Handling * Improve Debug Mode Handling * Improve Debug Mode Handling * Improve Debug Mode Handling * Autocommit PHP CS Fixer * Updated Composer.locK * Improve Debug Mode Handling * Improve Debug Mode Handling --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <lucas@bartholemy.com>
45 lines
1.3 KiB
PHP
Executable File
45 lines
1.3 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
/**
|
|
* Yii console bootstrap file.
|
|
*
|
|
* @link http://www.yiiframework.com/
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
* @license http://www.yiiframework.com/license/
|
|
*/
|
|
|
|
require(__DIR__ . '/vendor/autoload.php');
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../', '.env');
|
|
$dotenv->safeLoad();
|
|
|
|
$dynamicConfig = (is_readable(__DIR__ . '/config/dynamic.php')) ? require(__DIR__ . '/config/dynamic.php') : [];
|
|
$debug = !!($_ENV['HUMHUB_DEBUG'] ?? false) || !$dynamicConfig['params']['installed'];
|
|
|
|
defined('YII_DEBUG') or define('YII_DEBUG', $debug);
|
|
|
|
// fcgi doesn't have STDIN and STDOUT defined by default
|
|
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
|
|
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
|
|
|
|
|
|
|
|
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
|
|
|
|
$config = yii\helpers\ArrayHelper::merge(
|
|
require(__DIR__ . '/humhub/config/common.php'),
|
|
require(__DIR__ . '/humhub/config/console.php'),
|
|
$dynamicConfig,
|
|
require(__DIR__ . '/config/common.php'),
|
|
require(__DIR__ . '/config/console.php'),
|
|
humhub\helpers\EnvHelper::toConfig($_ENV),
|
|
);
|
|
|
|
try {
|
|
$exitCode = (new humhub\components\console\Application($config))->run();
|
|
exit($exitCode);
|
|
} catch (\Throwable $e) {
|
|
if (null === humhub\helpers\DatabaseHelper::handleConnectionErrors($e)) {
|
|
throw $e;
|
|
}
|
|
}
|