-
Notifications
You must be signed in to change notification settings - Fork 3.4k
#62622 Bump minimum supported PHP version to 7.4 #9181
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
Changes from 7 commits
0b8d493
74088d9
9f72abf
9c51d32
d5a6ce0
03baf87
77ffa57
696f180
6c5b745
8a0172f
edc4ed1
d4f55d9
bec6c6f
5b50d5f
4d2e027
b55f2ff
1aa1239
9a245a8
16907b7
279ae88
63ed7e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| { | ||
| "6-9": [ | ||
| "7.2", | ||
| "7.3", | ||
| "7.4", | ||
| "8.0", | ||
| "8.1", | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2676,11 +2676,9 @@ function wp_hash_password( | |||||
| * - `PASSWORD_ARGON2ID` | ||||||
| * - `PASSWORD_DEFAULT` | ||||||
| * | ||||||
| * The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier. | ||||||
| * | ||||||
| * @since 6.8.0 | ||||||
| * | ||||||
|
johnbillion marked this conversation as resolved.
|
||||||
| * @param string|int $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant. | ||||||
| * @param string $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant. | ||||||
| */ | ||||||
| $algorithm = apply_filters( 'wp_hash_password_algorithm', PASSWORD_BCRYPT ); | ||||||
|
|
||||||
|
|
@@ -2690,14 +2688,12 @@ function wp_hash_password( | |||||
| * The default hashing algorithm is bcrypt, but this can be changed via the {@see 'wp_hash_password_algorithm'} | ||||||
| * filter. You must ensure that the options are appropriate for the algorithm in use. | ||||||
| * | ||||||
| * The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier. | ||||||
| * | ||||||
| * @since 6.8.0 | ||||||
| * | ||||||
|
johnbillion marked this conversation as resolved.
|
||||||
| * @param array $options Array of options to pass to the password hashing functions. | ||||||
| * By default this is an empty array which means the default | ||||||
| * options will be used. | ||||||
| * @param string|int $algorithm The hashing algorithm in use. | ||||||
| * @param array $options Array of options to pass to the password hashing functions. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't seem to suggest multiple lines, but this is the one without whitespace to suggest:
Suggested change
This is based on looking at the options at https://www.php.net/manual/en/password.constants.php Naturally this could be done in a follow-up PR via Core-64224.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Yeah I'll do these separately as they're not strictly related to this change despite the parameter type being narrowed with the PHP version bump. |
||||||
| * By default this is an empty array which means the default | ||||||
| * options will be used. | ||||||
| * @param string $algorithm The hashing algorithm in use. | ||||||
| */ | ||||||
| $options = apply_filters( 'wp_hash_password_options', array(), $algorithm ); | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ | |
| * | ||
| * @global string $required_php_version | ||
| */ | ||
| $required_php_version = '7.2.24'; | ||
| $required_php_version = '7.4'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a specific bug fix version of 7.4 that we'd like to make a requirement? It seems that 7.2.24 was used based on usage numbers. I've created a similar spreadsheet to the one used for the previous bump. Some observations:
I don't know that we'll find a point release with a specific change that we want required, and the last 7.4.x release included security fixes, so technically all others are potentially insecure. There's a few possible landing spots:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a practical benefit to using a point release as the minimum instead of 7.4.0? When the minimum was bumped to 5.6 in Core-46594 we ended up on 5.6.20 because of the small fractional difference between that and 5.6.0. When it was bumped to 7.0 in Core-57345 we didn't bother looking at usage for point releases and just went with 7.0. My preference would be to not introduce an unnecessary point release restriction if it means sites that are on an older point release of 7.4 aren't able to update.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only benefit I can think of is that we ensure certain bug fix are present or specific vulnerabilities are not. However, I don't know that there is anything specific we want to target in this case. I don't feel strongly about including a particular point release, but just wanted to discuss it because we have used one in the past. |
||
|
|
||
| /** | ||
| * Holds the names of required PHP extensions. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.