-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Instanciando la sdk en un nuevo proyecto, con php 8.2, me dice:
E_DEPRECATED: Return type of Plexo\Sdk\Models\ModelsBase::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
/vendor/plexophp/php-sdk/src/Models/ModelsBase.php
La primera solución sería agregar para cada método declarado, una atributo declarativo.
En vez de:
public function offsetGet($offset) { return $this->__get($offset); }
agregar
#[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->__get($offset); }
Esto no es una solución definitiva, ya que habría que declarar explicitamente el return value de cada método (mixed, int, etc...)