UltraCart / rest_api_v2_sdk_php

UltraCart REST API PHP Client
Apache License 2.0
3 stars 4 forks source link

ArrayAccess Deprecations #22

Open mbopp opened 2 years ago

mbopp commented 2 years ago

I receive a lot of deprecation notices when running tests (using PHP 8.1).

All are similar to this:

Deprecated: Return type of ultracart\v2\models\CartItem::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Suppressing these deprecation notices is my typical course of action, however these do not seem to be affected by any attempt of preventing log channels, etc.

Is there anything I can do in my code locally to suppress these noisy messages?

perrytew commented 2 years ago

Hey. We use Swagger to generate our SDKs from a YAML file we build based on our REST API. I'll review the templates they're using to auto-generate our models and see what I can do to eliminate the warning completely. I'll be in touch.