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

[warning] We ge this error message for Elliptic\Curve\ShortCurve\Point #6

Open
imClement opened this issue Mar 16, 2022 · 5 comments
Open

Comments

@imClement
Copy link

Hi,

We get this warning in the log :Return type of Elliptic\Curve\ShortCurve\Point::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/simplito/elliptic-php/lib/Curve/ShortCurve/Point.php on line 84

@sawirricardo
Copy link
Owner

what did you try to do?

@matsmakeshift
Copy link

matsmakeshift commented Apr 18, 2022

Did you solve this? I'm facing the same issue.
On my localhost it's running fine, but on the webserver I receive exactly the error from above when initializing the EC context: $ec = new Elliptic\EC('secp256k1');

ERROR: Return type of Elliptic\Curve\ShortCurve\Point::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice on line 84 in file /home/.sites/.../.../.../../../.../vendor/simplito/elliptic-php/lib/Curve/ShortCurve/Point.php.

@sawirricardo
Copy link
Owner

Hm, have you tried to look at https://github.com/simplito/elliptic-php? are there any solutions there?

@matsmakeshift
Copy link

I looked there but this was the only spot I found where the issue was at least mentioned.
Anyway I found the reason being the PHP version I used on the Webserver. To solve this issue you can either downgrade to 8.0.* or use the #[\ReturnTypeWillChange] attribute as suggested in the error message

@sawirricardo
Copy link
Owner

Can you make a PR for this? happy to merge it 👍

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

3 participants