ircmaxell / password_compat

Compatibility with the password_* functions that ship with PHP 5.5
MIT License
2.15k stars 421 forks source link

php7 Compatibility problem #106

Open oasfuyou opened 6 years ago

oasfuyou commented 6 years ago

105 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead 105 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead 105 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since PHP 7.1 and removed since PHP 7.2

bpearson commented 6 years ago

This library shouldn't be used on any PHP version equal to 5.5 or higher. You should be able to use the native password_* functions.

oasfuyou commented 6 years ago

Hi: but other package depends this package,so how to improve to php7

------------------ Original ------------------ From: "Benjamin Pearson"notifications@github.com; Date: Fri, Aug 24, 2018 04:36 PM To: "ircmaxell/password_compat"password_compat@noreply.github.com; Cc: "付友"fuyou@oasgames.com; "Author"author@noreply.github.com; Subject: Re: [ircmaxell/password_compat] php7 Compatibility problem (#106)

This library shouldn't be used on any PHP version equal to 5.5 or higher

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xabbuh commented 6 years ago

That part of the code will never be executed on PHP 7 as the password_hash() function does exist there: https://github.com/ircmaxell/password_compat/blob/master/lib/password.php#L24

Synchro commented 6 years ago

...and if your code analyser is still complaining, it's a bug in your code analyser, not this lib.

jrfnl commented 6 years ago

@oasfuyou These errors can be safely ignored (as long as they come from this package).

All the same, this is something which we could sort out in the new PHPCompatibilityPasswordCompat repo. Would you mind opening an issue about it in that repo ?