Cleanup TOTP Provider: Remove legacy PHP 5.6 compatibility logic & duplicate autocomplete attribute#808
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
georgestephanis
left a comment
There was a problem hiding this comment.
Some whitespace issues that need tidying for core styles. PHPCS can probably catch them automatically?
providers/class-two-factor-totp.php
Outdated
| $lower = $value & $lowmap; | ||
|
|
||
| return pack( 'NN', $higher, $lower ); | ||
| public static function pack64(int $value): string |
There was a problem hiding this comment.
Should there be a space before the type declaration here after the opening parens?
providers/class-two-factor-totp.php
Outdated
| public static function pack64(int $value): string | ||
| { | ||
| // Native 64-bit support (modern PHP on 64-bit builds) | ||
| if (PHP_INT_SIZE === 8) { |
There was a problem hiding this comment.
Missing whitespace / core style guides here and following.
Co-authored-by: George Stephanis <daljo628@gmail.com>
What?
Refactors pack64() to remove outdated PHP <5.6 compatibility code while retaining 32-bit support.
Why?
PHP 5.6 is no longer supported. The previous implementation contained unnecessary version checks and redundant branching, increasing complexity without benefit.
How?
Changelog Entry