-
Notifications
You must be signed in to change notification settings - Fork 115
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
Deprecated warnings on PHP 7.1 #55
Comments
Hi, Any idea when this will be fixed? |
Sounds like never, since |
Sorry, how do you mean? Edit: Ah ok, you mean effectively replaces this lib in 7+? |
It doesn't generate as much variation, but this works equally well: $length = 32;
$random = substr(bin2hex(random_bytes($length)), 0, $length); |
Please fix this... |
Please fix it ! |
+1 |
3 similar comments
+1 |
+1 |
+1 |
I was also stuck with this and had to make it working ASAP. I'm no-way a security specialist - I only have a vague idea of what I'm doing. Improvements are welcome. |
+1 |
Somehow, my |
In PHP 7.2, the mcrypt library will be removed from core completely. There is a PECL extension for mcrypt, but you cannot install it on PHP 7.1, so you're left with a deprecation warning until 7.2. We should update this lib to check for the extension and only provide mcrypt if the extension is present. |
I've just opened this request on bugs.php.net to ask that pecl/mcrypt be installable on PHP 7.1. https://bugs.php.net/bug.php?id=74375 |
Another one warning "Function mcrypt_enc_get_iv_size() is deprecated" in AbstractMcryptMixer.php at line 77 |
+1 |
+1000000000 |
I had to abandon this library and use |
+1 |
1 similar comment
+1 |
@techi602 Might not be a good idea. ramsey/uuid#80 See https://packagist.org/packages/paragonie/random_compat instead. |
If we change https://github.com/ircmaxell/RandomLib/blob/master/lib/RandomLib/AbstractMcryptMixer.php#L67 to return version_compare(PHP_VERSION, '7.1') < 0 && extension_loaded('mcrypt'); would that fix it? |
Any progress with this one ? |
A lot of people are using this package. It is so sad that it is not working any more. |
I'm debating forking it. It's been nigh impossible to get any feedback from Anthony for... going on a year now... from any venue or channel. |
I found an alternative here https://github.com/antonioribeiro/random. He is using |
@ircmaxell any updates with this ? |
In the off-chance that it takes months or years before we hear back from @ircmaxell, I've gone ahead with a fork of this library. https://github.com/paragonie/RandomLib It solves this issue, by not loading mcrypt at all on PHP 7.1 and higher. Instead, the kernel's CSPRNG is preferred. |
I have commit/merge access on this library, and I’ll be happy to review and merge in any PR to address this that doesn’t break BC. |
@ramsey I may, after I get my fork stable, send a PR from a branch that undoes the BC breaks to review. |
|
When running RandomLib 1.2.0 under PHP 7.1, the following warning appears:
https://wiki.php.net/rfc/mcrypt-viking-funeral
The text was updated successfully, but these errors were encountered: