PHP 8 Compatibility #103
AlexandruGG
started this conversation in
General
Replies: 3 comments 20 replies
|
@drupol let me know your thoughts on this! 😁 |
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. |
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. |
20 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently
loophp/collectioncan 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
asyncMapoperation.I think what we need to do is:
asyncMapand implement plan (medium)Regarding point 3, here are some thoughts:
asyncMapthat 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
LogicExceptionwhen 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
AsyncMapoperation and use the corresponding library. On a quick search I couldn't find an equivalent package that supports both 7.4 and 8.0.All reactions