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

Serializable interface deprecated in PHP 8.1 #1680

Closed
W1DJM opened this issue Jul 15, 2021 · 1 comment
Closed

Serializable interface deprecated in PHP 8.1 #1680

W1DJM opened this issue Jul 15, 2021 · 1 comment

Comments

@W1DJM
Copy link

W1DJM commented Jul 15, 2021

Using PHP 8.1.0alpha 3 the following errors get thrown when using BigInteger:

[15-Jul-2021 12:45:34 America/New_York] PHP Deprecated: The Serializable interface is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in D:\var\Classes\vendor\phpseclib\phpseclib\phpseclib\Math\BigInteger.php on line 42
[15-Jul-2021 12:45:34 America/New_York] PHP Deprecated: The Serializable interface is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in D:\var\Classes\vendor\phpseclib\phpseclib\phpseclib\Math\BigInteger\Engines\GMP.php on line 28
[15-Jul-2021 12:45:34 America/New_York] PHP Deprecated: The Serializable interface is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in D:\var\Classes\vendor\phpseclib\phpseclib\phpseclib\Math\BigInteger\Engines\PHP64.php on line 29

The code that is generating the errors is:

$key = [
	'e' => new BigInteger(base64_decode($exponent), 256),
	'n' => new BigInteger(base64_decode($modulus), 256)
];
@terrafrost
Copy link
Member

5e29049 should fix this.

Thanks!

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