Open
Description
Bug Report
Q | A |
---|---|
Version(s) | 4.10.0 |
Summary
After upgrading to swoole 6.0.1 with php 8.4, this error is shown when trying to run services with coroutines enabled:
app-1 | [2025-02-14T15:34:27.287024+00:00] licensing-services-error.ERROR: Uncaught Exception TypeError: "Swoole\Runtime::enableCoroutine(): Argument #1 ($flags) must be of type int, true given" at /var/www/vendor/mezzio/mezzio-swoole/src/HttpServerFactory.php line 114 {"exception":"[object] (TypeError(code: 0): Swoole\\Runtime::enableCoroutine(): Argument #1 ($flags) must be of type int, true given at /var/www/vendor/mezzio/mezzio-swoole/src/HttpServerFactory.php:114)"} {"hostname":"9f91bcc4648d","service_id":"service"}
app-1 |
app-1 | In HttpServerFactory.php line 114:
app-1 |
app-1 | Swoole\Runtime::enableCoroutine(): Argument #1 ($flags) must be of type int
app-1 | , true given
app-1 |
app-1 |
app-1 | mezzio:swoole:start [-d|--daemonize] [-w|--num-workers NUM-WORKERS] [-t|--num-task-workers NUM-TASK-WORKERS]
src/HttpServerFactory.php
has SwooleRuntime::enableCoroutine(true);
(https://github.com/mezzio/mezzio-swoole/blob/4.11.x/src/HttpServerFactory.php#L114), after changing to SwooleRuntime::enableCoroutine(1);
it works.
Current behavior
Server fails to start
How to reproduce
Update to swoole 6
Expected behavior
Server running