Skip to content

Commit

Permalink
Fixed bug that default option cannot be loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Dec 4, 2023
1 parent 993a18d commit 8147f06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/hyperf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
error_reporting(E_ALL);

! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));

require BASE_PATH . '/vendor/autoload.php';

! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());

// Self-called anonymous function that creates its own scope and keep the global namespace clean.
Expand Down
3 changes: 2 additions & 1 deletion installer/resources/bin/hyperf.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ error_reporting(E_ALL);
date_default_timezone_set('%TIME_ZONE%');

! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());

require BASE_PATH . '/vendor/autoload.php';

! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());

// Self-called anonymous function that creates its own scope and keep the global namespace clean.
(function () {
Hyperf\Di\ClassLoader::init();
Expand Down

0 comments on commit 8147f06

Please sign in to comment.