Skip to content

[2.x] Suppress PHP 8 deprecation notice for Iterator implementation methods #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

ElfSundae
Copy link

I am using PHP 8.1 and there is a third-party library that depends on php-dot-notation 2.x, my PHP logs have too many these notices 😭
If there are no other issues, Please merge this PR and publish a new version for 2.x, thanks a lot 👍

PHP Deprecated: Return type of Adbar\Dot::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/elfsundae/data/projects/php/aliyun-tea-php/vendor/adbario/php-dot-notation/src/Dot.php on line 510
PHP Deprecated: Return type of Adbar\Dot::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/elfsundae/data/projects/php/aliyun-tea-php/vendor/adbario/php-dot-notation/src/Dot.php on line 521
PHP Deprecated: Return type of Adbar\Dot::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/elfsundae/data/projects/php/aliyun-tea-php/vendor/adbario/php-dot-notation/src/Dot.php on line 532
PHP Deprecated: Return type of Adbar\Dot::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/elfsundae/data/projects/php/aliyun-tea-php/vendor/adbario/php-dot-notation/src/Dot.php on line 548

@adbario
Copy link
Owner

adbario commented Jul 12, 2022

Thanks for the PR. 2.x needs to support PHP all the way down to version 5.5, so this needs a bit of investigation and testing. I've just done the change from Travis to Github actions for 2.x and will test these changes out asap.

@adbario
Copy link
Owner

adbario commented Jul 12, 2022

Couldn't find any issues and all tests are running fine.

Thanks for your help with this project 🚀

@adbario adbario merged commit 43c7f15 into adbario:2.x Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants