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

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions