php-graphql-client
php-graphql-client copied to clipboard
Fix PHP 8.4 deprecation warnings
What / Why
Fix PHP 8.4 deprecation warnings:
php-graphql-client/src/Client.php:64
GraphQL\Client::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead
php-graphql-client/src/Client.php:0
GraphQL\Client::__construct(): Implicitly marking parameter $auth as nullable is deprecated, the explicit nullable type must be used instead
In PHP 8.4 and above, nullable arguments need to be explicitly marked as such when providing a typehint. This can either be done by using the ? operator or by add "null" to the typehint through a union type. This PR addresses this, fixing deprecation warnings emitted by PHP 8.4.
See: https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated