hetzner-cloud-php-sdk icon indicating copy to clipboard operation
hetzner-cloud-php-sdk copied to clipboard

Upgrade tightenco/collect to v8

Open ThomasLandauer opened this issue 4 years ago • 4 comments

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

ThomasLandauer avatar May 29 '21 14:05 ThomasLandauer

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 avatar Nov 28 '21 16:11 ThomasLandauer

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!

ThomasLandauer avatar Dec 06 '21 20:12 ThomasLandauer

Hey @ThomasLandauer,

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

LKaemmerling avatar Dec 07 '21 07:12 LKaemmerling

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

ThomasLandauer avatar Dec 07 '21 16:12 ThomasLandauer

tightenco/collect was removed with the last release.

LKaemmerling avatar Apr 23 '24 07:04 LKaemmerling