Skip to content
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

Upgrade tightenco/collect to v8 #79

Closed
ThomasLandauer opened this issue May 29, 2021 · 5 comments
Closed

Upgrade tightenco/collect to v8 #79

ThomasLandauer opened this issue May 29, 2021 · 5 comments

Comments

@ThomasLandauer
Copy link
Contributor

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

@ThomasLandauer
Copy link
Contributor Author

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
Copy link
Contributor Author

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 added a commit that referenced this issue Dec 7, 2021
based on the feedback we got in #79 i decided to use the now spilt out upstream version from illuminate/collection. The tighthenco collect package was basically just this split out. So this acts as a drop in replacement.

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
@LKaemmerling
Copy link
Collaborator

Hey @ThomasLandauer,

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

@ThomasLandauer
Copy link
Contributor Author

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
Copy link
Collaborator

tightenco/collect was removed with the last release.

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

No branches or pull requests

2 participants