-
-
Notifications
You must be signed in to change notification settings - Fork 132
Clash with PHP 8.1 JsonSerializable Interface #144
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
Comments
The issue actually relates to this issue raised in PHP by jrfnl with the interface definition for This can easily be resolved by specifying the return type in the implementation. However, the There are three possible solutions that I am aware of for this that would still allow usage with PHP < 8.0
A combination of the first and third solutions might be a good approach, eliminating the deprecation notice, with the annotation highlighting that there is a difference between the implementation signature and the interface signature. |
Thank you @MarkBaker, this should be fixed in the latest release. |
Running tests against the latest PHP 8.1 nightly causes fatal errors with a clash between MyClabs Enum and the new return typehints implementation in the interface for
jsonSerializable
in PHP 8.1and the stack trace (for reference)
As PHP 8.1 is now in alpha release stage, I thought I'd better raise an issue to ensure that you are aware of the problem.
This is against version 1.8.0 of the Enum library
The text was updated successfully, but these errors were encountered: