kamermans / guzzle-oauth2-subscriber

OAuth 2.0 Client for Guzzle 4, 5, 6 and 7 with PHP 5.4 - PHP 8.0 - no more dependency hell!
MIT License
140 stars 31 forks source link

Fix PHP 8.1 deprecation notice #39

Closed roy-bongers closed 2 years ago

roy-bongers commented 2 years ago

PHP 8.1 throws a deprecation error:

Deprecated: Return type of kamermans\OAuth2\Utils\Collection::offsetGet($offset) should either be compatible
with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used
to temporarily suppress the notice in /vendor/kamermans/guzzle-oauth2-subscriber/src/Utils/Collection.php on
line 31

Adding this comment wil fix the deprecation error for now: https://php.watch/versions/8.1/ReturnTypeWillChange