maclof / kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster (https://github.com/kubernetes/kubernetes)
MIT License
231 stars 82 forks source link

PHP 8.1 Compatibility #98

Closed MaSpeng closed 2 years ago

MaSpeng commented 2 years ago

Description:

Currently when using this library with PHP 8.1 the following type error occures:

NOTICE: PHP message: PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Maclof\Kubernetes\RepositoryRegistry::offsetExists($method) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/backend/vendor/maclof/kubernetes-client/src/RepositoryRegistry.php:54

Possible solutions: