Files
hdk-skeleton/tests/bootstrap.php

35 lines
825 B
PHP
Raw Normal View History

2023-03-21 16:56:42 +08:00
<?php
declare(strict_types=1);
use Swoole\Runtime;
use Hyperf\Di\ClassLoader;
use Hyperf\Contract\ApplicationInterface;
2023-03-21 16:56:42 +08:00
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
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);
2023-03-21 16:56:42 +08:00
Runtime::enableCoroutine(true);
2023-03-21 16:56:42 +08:00
require BASE_PATH . '/vendor/autoload.php';
ClassLoader::init();
2023-03-21 16:56:42 +08:00
$container = require BASE_PATH . '/config/container.php';
$container->get(ApplicationInterface::class);