jsonapi-bundle icon indicating copy to clipboard operation
jsonapi-bundle copied to clipboard

Not compatible with psr/http-message version 2.0

Open C0d3Br3aker opened this issue 2 years ago • 2 comments

After upgrading "psr/http-message" from version 1.1 to 2.0 this bundle can't be used anymore and you get the following error log:

php.CRITICAL: Fatal Compile Error: Declaration of WoohooLabs\Yin\JsonApi\Request\AbstractRequest::withCookieParams(array $cookies) must be compatible with Psr\Http\Message\ServerRequestInterface::withCookieParams(array $cookies): Psr\Http\Message\ServerRequestInterface {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Compile Error: Declaration of WoohooLabs\\Yin\\JsonApi\\Request\\AbstractRequest::withCookieParams(array $cookies) must be compatible with Psr\\Http\\Message\\ServerRequestInterface::withCookieParams(array $cookies): Psr\\Http\\Message\\ServerRequestInterface at /var/www/symfony/vendor/woohoolabs/yin/src/JsonApi/Request/AbstractRequest.php:212)"} []
request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\FatalError: "Compile Error: Declaration of WoohooLabs\Yin\JsonApi\Request\AbstractRequest::withCookieParams(array $cookies) must be compatible with Psr\Http\Message\ServerRequestInterface::withCookieParams(array $cookies): Psr\Http\Message\ServerRequestInterface" at /var/www/symfony/vendor/woohoolabs/yin/src/JsonApi/Request/AbstractRequest.php line 212 {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Compile Error: Declaration of WoohooLabs\\Yin\\JsonApi\\Request\\AbstractRequest::withCookieParams(array $cookies) must be compatible with Psr\\Http\\Message\\ServerRequestInterface::withCookieParams(array $cookies): Psr\\Http\\Message\\ServerRequestInterface at /var/www/symfony/vendor/woohoolabs/yin/src/JsonApi/Request/AbstractRequest.php:212)"} []
php.CRITICAL: Uncaught Error: Class "WoohooLabs\Yin\JsonApi\Request\JsonApiRequest" not found {"exception":"[object] (Error(code: 0): Class \"WoohooLabs\\Yin\\JsonApi\\Request\\JsonApiRequest\" not found at /var/www/symfony/vendor/paknahad/jsonapi-bundle/src/Factory/JsonApiFactory.php:43)"} []
image

C0d3Br3aker avatar May 31 '23 12:05 C0d3Br3aker

I am also experiencing this - Ill put a PR in next week to add the new spec if @paknahad doesnt have this on the radar ?

steveclifton avatar Jul 13 '23 09:07 steveclifton

@steveclifton @paknahad Hello. Are there any plans to fix this issue? I have encountered it as well.

kkuhto avatar May 16 '24 07:05 kkuhto