Merge branch '1.9.x' into feat/migrate-di-container

This commit is contained in:
Chirag Aggarwal
2026-04-05 21:16:30 +05:30
committed by GitHub
8 changed files with 64 additions and 12 deletions
+5 -1
View File
@@ -325,17 +325,20 @@ $container->set('bus', function (Registry $register) use ($container) {
$container->set('telemetry', fn () => new NoTelemetry(), []);
$exitCode = 0;
$cli
->error()
->inject('error')
->inject('logError')
->action(function (Throwable $error, callable $logError) use ($taskName) {
->action(function (Throwable $error, callable $logError) use ($taskName, &$exitCode) {
call_user_func_array($logError, [
$error,
'Task',
$taskName,
]);
$exitCode = 1;
Timer::clearAll();
});
@@ -344,3 +347,4 @@ $cli->shutdown()->action(fn () => Timer::clearAll());
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
require_once __DIR__ . '/init/span.php';
run($cli->run(...));
Console::exit($exitCode);