PHP 8 Compatibility #103
AlexandruGG
started this conversation in
General
Replies: 3 comments 20 replies
-
@drupol let me know your thoughts on this! 😁 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Alex, We can slowly move on by fixing the 2 first points, then, for the last point, I can discuss with the maintainer (@kelunik) and see how we can update properly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
What makes you think there's no PHP 8 support or no plans to add it? Having no release for a year can also mean it's simply stable. |
Beta Was this translation helpful? Give feedback.
20 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently
loophp/collection
can be installed in a project running PHP 8, however does not have full compatibility with it.I started a branch to look into compatibility issues, and good news is the only one that seems to be problematic so far is the
asyncMap
operation.I think what we need to do is:
asyncMap
and implement plan (medium)Regarding point 3, here are some thoughts:
asyncMap
that useful? Surely a nice to have but I imagine very few users actually benefit from it; and those actually using a lot of concurrency in PHP probably won't rely on it because they will already have their own thingsThis being said, I see a couple of options regarding
asyncMap
:A) remove it from the next major version with PHP 8 support. It would still be available for everyone using the library on PHP 7.4
B) keep it in the library but "disable" it for PHP 8 users, i.e. throw a type of
LogicException
when used. This would be clearly specified in the documentation as wellC) add support and needed logic using a different library for parallelism, like https://github.com/spatie/fork. Note that his one is only available on PHP 8, so we'd have to check the running php version in the
AsyncMap
operation and use the corresponding library. On a quick search I couldn't find an equivalent package that supports both 7.4 and 8.0.Beta Was this translation helpful? Give feedback.
All reactions