Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E_COMPILE_ERROR Declaration of Comet\Request::getServerParams() #39

Open
vaahru opened this issue Apr 18, 2024 · 0 comments
Open

E_COMPILE_ERROR Declaration of Comet\Request::getServerParams() #39

vaahru opened this issue Apr 18, 2024 · 0 comments

Comments

@vaahru
Copy link

vaahru commented Apr 18, 2024

OS: Debian 12
PHP: 8.3
Comet version: v2.4.4

I use example code:

<?php
require_once __DIR__ . '/vendor/autoload.php';

$app = new Comet\Comet([
    'host' => '10.0.0.7',
    'port' => 8041,
]);

$app->get('/json',
    function ($request, $response) {
        $data = [ "message" => "Hello, Comet!" ];
        return $response
            ->with($data);
});

$app->run();

and receive this error:

php app.php start
Comet v2.4.4 [8 workers] ready on http://10.0.0.7:8041
Workerman[app.php] start in DEBUG mode
PHP Fatal error:  Declaration of Comet\Request::getServerParams() must be compatible with Psr\Http\Message\ServerRequestInterface::getServerParams(): array in /home/user/api/vendor/gotzmann/comet/src/Request.php on line 266
Worker[191114] process terminated with ERROR: E_COMPILE_ERROR "Declaration of Comet\Request::getServerParams() must be compatible with Psr\Http\Message\ServerRequestInterface::getServerParams(): array in /home/user/api/vendor/gotzmann/comet/src/Request.php on line 266"
worker[Comet v2.4.4:191114] exit with status 65280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant