-
Notifications
You must be signed in to change notification settings - Fork 21
Description
(raising this issue just to gather feedbacks, we probably do not want to invest time in it)
Using this library with webonyx/graphql-php@^14 throws a:
request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\FatalError: "Error: Class TheCodingMachine\GraphQLite\Validator\ConstraintViolationException contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (GraphQL\Error\ClientAware::getCategory)" at ConstraintViolationException.php line 11 {"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Error: Class TheCodingMachine\GraphQLite\Validator\ConstraintViolationException contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (GraphQL\Error\ClientAware::getCategory) at /var/www/html/vendor/thecodingmachine/graphqlite-symfony-validator-bridge/src/ConstraintViolationException.php:11)"} []
This is in fact required in webonyx/graphql-php@^14:
https://github.com/webonyx/graphql-php/blob/d9c2fdebc6aa01d831bc2969da00e8588cffef19/src/Error/ClientAware.php#L35
But this is not declared in this library:
https://github.com/thecodingmachine/graphqlite-symfony-validator-bridge/blob/2323327b7e7c6a2796fcba0eb6865a2979457cf7/src/ConstraintViolationException.php
Note that this is not required with webonyx/graphql-php@^15:
https://github.com/webonyx/graphql-php/blob/b2d7b743ec8f1d40c7827f06675a446eaf6892c4/src/Error/ClientAware.php
We could use a conflict (or a minimum dependency requirement) to alleviate for this error.