comet icon indicating copy to clipboard operation
comet copied to clipboard

E_COMPILE_ERROR Declaration of Comet\Request::getServerParams()

Open vaahru opened this issue 1 year ago • 2 comments
trafficstars

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

vaahru avatar Apr 18 '24 14:04 vaahru

Should be fixed now, please check out

gotzmann avatar Jun 19 '24 12:06 gotzmann