LKDevelopment / hetzner-cloud-php-sdk

A PHP SDK for the Hetzner Cloud API
MIT License
104 stars 51 forks source link

Upgrade tightenco/collect to v8 #79

Closed ThomasLandauer closed 2 months ago

ThomasLandauer commented 3 years ago

See https://github.com/tighten/collect

ThomasLandauer commented 2 years ago

In PHP 8.1, tightenco/collect is throwing a bunch of deprecation warnings, so this is getting more urgent now. Since the package isn't maintained anymore, it's probably best to get rid of it completely ;-)

ThomasLandauer commented 2 years ago

Ping @LKaemmerling vimeo/psalm v4.14.0 is now crashing with:

PHP Fatal error: During inheritance of ArrayAccess: Uncaught RuntimeException: PHP Error: Return type of Tightenco\Collect\Support\Collection::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 vendor/tightenco/collect/src/Collect/Support/Collection.php:1789 in vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66

As a workaround, I had to add the stated #[\ReturnTypeWillChange] attribute at 7 places in that file (Collection.php). So this dependency makes your library more and more unusable!

LKaemmerling commented 2 years ago

Hey @ThomasLandauer,

thank you for your issue. I just released v2.5.1 which fixes the issue.

ThomasLandauer commented 2 years ago

Great, thanks! But since the entire package is deprecated, it would be even better to remove it completely. What are you using it for?

LKaemmerling commented 2 months ago

tightenco/collect was removed with the last release.