loophp / phptree

An implementation of tree data structure
MIT License
93 stars 4 forks source link

Deprecation warnings from php 8.1 #22

Closed olivernybroe closed 2 years ago

olivernybroe commented 2 years ago

When using the package with PHP 8.1, we get the following deprecation errors

Return type of loophp\phptree\Node\Node::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/platform/platform/vendor/loophp/phptree/src/Node/Node.php on line 207
drupol commented 2 years ago

Sorry for the late reply. Going to fix this today.

drupol commented 2 years ago

I released version 2.6.8 which should fix the issue. Please re-open this if this is not the case. Thanks for reporting!

olivernybroe commented 2 years ago

Thanks a lot 👍

Well, I could just have made a pr also 😉

drupol commented 2 years ago

You can still do it if you see something that needs to be updated!

Hint: I need to switch from PHPSpec to PHPunit :)