Skip to content

Commit

Permalink
Merge pull request #1881 from WordPress/feature/update-minimum-wp-ver…
Browse files Browse the repository at this point in the history
…sion

Update default minimum_supported_version to WP 5.1
  • Loading branch information
dingo-d committed Apr 9, 2020
2 parents 63ac81e + 18703c7 commit 02af9f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WordPress/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ abstract class Sniff implements PHPCS_Sniff {
*
* @var string WordPress version.
*/
public $minimum_supported_version = '5.0';
public $minimum_supported_version = '5.1';

/**
* Custom list of classes which test classes can extend.
Expand Down
6 changes: 6 additions & 0 deletions WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,12 @@ class DeprecatedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
'alt' => 'wp_update_user()',
'version' => '5.3.0',
),

// WP 5.4.0.
'wp_get_user_request_data' => array(
'alt' => 'wp_get_user_request()',
'version' => '5.4.0',
),
);

/**
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,5 @@ install_blog();
_wp_json_prepare_data();
_wp_privacy_requests_screen_options();
update_user_status();
/* ============ WP 5.4 ============ */
wp_get_user_request_data();
7 changes: 5 additions & 2 deletions WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ public function getErrorList() {
*/
public function getWarningList() {

$warnings = array_fill( 342, 6, 1 );
$warnings = array_fill( 342, 8, 1 );

// Unset the lines related to version comments.
unset( $warnings[344] );
unset(
$warnings[344],
$warnings[348]
);

return $warnings;
}
Expand Down

0 comments on commit 02af9f6

Please sign in to comment.