rluders / wn-jwtauth-plugin

JWTAuth Plugin for WinterCMS
GNU General Public License v3.0
29 stars 28 forks source link

Add types to comply with symphony HTTPExceptionInterface #68

Closed bugzbrown closed 2 years ago

bugzbrown commented 2 years ago

issue

Error message when trying to use the user related endpoints:

Symfony\Component\ErrorHandler\Error\FatalError: Declaration of RLuders\JWTAuth\Exceptions\JsonValidationException::getStatusCode() must be compatible with Symfony\Component\HttpKernel\Exception\HttpExceptionInterface::getStatusCode(): int in /app/code/plugins/rluders/jwtauth/exceptions/JsonValidationException.php:12

fix

HTTPExceptionInterface in php 8> requires that the declaration contain types This quick patch makes the JsonValidationException compatible to Symfony\Component\HttpKernel\Exception\HttpExceptionInterface again.

rluders commented 2 years ago

Thanks, @bugzbrown