swoole
swoole copied to clipboard
🐛 Bug Report: Declaration of getQuery should compatible with Utopia\Request::getQuery
👟 Reproduction steps
Using
https://github.com/utopia-php/demo
But change the Dockerfile FROM to phpswoole/swoole:4.8-php8.1-alpine
👍 Expected behavior
It should display the index.html
👎 Actual Behavior
An error occured:
ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Declaration of Utopia\Swoole\Request::getQuery(string $key, $default = null) must be compatible with Utopia\Request::getQuery(string $key, mixed $default = null): mixed in /app/vendor/utopia-php/swoole/src/Swoole/Request.php on line 86
Upon checking the code, this is due to that the Utopia\Request 2nd argument (default) is already has a typehint, where the Utopia\Swoole\Request does not have a typehint
🎲 Utopia Swoole version
Different version (specify in environment)
💻 PHP Version
Different version (specify in environment)
💻 Operating system
Linux
🧱 Your Environment
Swoole: 4.8 PHP: 8.1
👀 Have you spent some time to check if this issue has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct