-
Notifications
You must be signed in to change notification settings - Fork 113
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
php 8.1 support #60
php 8.1 support #60
Conversation
…ll where type-equivalent values can be used
…tRawGuesses and a few tests
This looks to have ended up including #59's change |
…mplicit float => int truncation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an awesome set of changes. The only thing I'm hesitant about is the int/float thing since it's changing behavior, but I think it's fine (except for the one specific thing I commented on for values between PHP_INT_MAX and PHP_FLOAT_MAX).
|
I think I might need to walk back those int => float typing. Looking at the readme;
32bit php can't represent 10^10 as an integer, while 64bit php can. |
… difficult guesses effectively
…isons which may vary depending on php compiling settings and platform
I've got some additional fixes related to PHP 8.1 that I'll be adding to this PR later today. For the sake of speeding up the changes, I've also added strict_types=1 to each file and replaced most instances of assertEquals with assertSame. Hopefully whatever bug was causing that odd discrepancy in testing will be resolved in the process. |
I think this is ready for review after the last round of fixes |
I can confirm that this seems to be working fine in production. |
Thanks all! This is merged and tagged as 1.3.0. |
I maintain Password Tools, a free opensource add-on for XenForo forum software which uses this library to offer useful password complexity checks.
As part of updating my code to support php 8.1, this library was identified as having compatibility issues.
This change does the following;
int
but could sometimes return afloat
. This behaviour was corrected, which required adjusting some tests. I failed to see how it returning a float value is very useful.