Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

🐛 Bug Report: Declaration of getQuery should compatible with Utopia\Request::getQuery #17

@cydrickn

Description

@cydrickn

👟 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?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions