mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 01:55:06 +08:00
- 将所有 hyperf 组件版本从 2.2.x 升级到 3.0.x - 更新 singularity/hdk-core 依赖从0.1.6 到 1.0.0 - 移除 minimum-stability 配置项 - 添加 runtime 目录到 .gitignore - 更新 RedisArray 类型提示和返回值 - 为监听器方法添加 void 返回类型 - 更新 ColorLineFormatter 的 LogRecord 类型提示 - 添加 hyperf.php 入口文件
33 lines
876 B
PHP
33 lines
876 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Hyperf\Di\ClassLoader;
|
|
use Hyperf\Di\Container;
|
|
use Hyperf\Di\Definition\DefinitionSource;
|
|
use Hyperf\Utils\ApplicationContext;
|
|
use Psr\Container\ContainerInterface;
|
|
use Swoole\Runtime;
|
|
|
|
ini_set('display_errors', 'on');
|
|
ini_set('display_startup_errors', 'on');
|
|
|
|
error_reporting(E_ALL);
|
|
date_default_timezone_set('Asia/Shanghai');
|
|
|
|
|
|
!defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
|
|
!defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
|
|
|
|
Runtime::enableCoroutine();
|
|
|
|
require BASE_PATH . '/vendor/autoload.php';
|
|
ClassLoader::init();
|
|
|
|
$container = new Container(new DefinitionSource([]));
|
|
if (!$container instanceof ContainerInterface) {
|
|
throw new RuntimeException('The dependency injection container is invalid.');
|
|
}
|
|
$container = ApplicationContext::setContainer($container);
|