Skip to content

Conversation

@buzz8year
Copy link

@buzz8year buzz8year commented Nov 30, 2023

Declaring return data types to ApiResource.php methods to match php@8.2

Resolves below compatibility issues:

ErrorException: During inheritance of ArrayObject: Uncaught ErrorException: Return type of CoinbaseCommerce\Resources\ApiResource::getIterator(): mixed should either be compatible with ArrayObject::getIterator(): Iterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/coinbase/coinbase-commerce/src/Resources/ApiResource.php:169

ErrorException: Declaration of CoinbaseCommerce\Resources\ApiResource::ksort(): void must be compatible with ArrayObject::ksort(int $flags = SORT_REGULAR): bool in /vendor/coinbase/coinbase-commerce/src/Resources/ApiResource.php:159

ErrorException: During inheritance of ArrayObject: Uncaught yii\base\ErrorException: Return type of CoinbaseCommerce\Resources\ApiResource::count() should either be compatible with ArrayObject::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/coinbase/coinbase-commerce/src/Resources/ApiResource.php:149

etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant