Skip to content

Commit 48a519f

Browse files
committed
WP/DeprecatedFunctions: update the functions list based on WP 6.9.0-RC2
Based on a scan of WP Core at commit WordPress/wordpress-develop@87e656 using a preliminary sniff created for issue 1803. Includes tests.
1 parent 5bb8db0 commit 48a519f

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ final class DeprecatedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
4343
* To retrieve a function list for comparison, the following tool is available:
4444
* https://github.com/JDGrimes/wp-deprecated-code-scanner
4545
*
46-
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
46+
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
4747
*
4848
* @var array
4949
*/
@@ -1708,6 +1708,18 @@ final class DeprecatedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
17081708
'alt' => 'wp_enqueue_classic_theme_styles()',
17091709
'version' => '6.8.0',
17101710
),
1711+
1712+
// WP 6.9.0.
1713+
// Note: the deprecation of the (polyfilled) `utf8_encode()` and `utf8_decode()` functions is deliberately
1714+
// not listed here as these are polyfills for the PHP native functions, not WP native functions.
1715+
'seems_utf8' => array(
1716+
'alt' => 'wp_is_valid_utf8()',
1717+
'version' => '6.9.0',
1718+
),
1719+
'wp_print_auto_sizes_contain_css_fix' => array(
1720+
'alt' => 'wp_enqueue_img_auto_sizes_contain_css_fix()',
1721+
'version' => '6.9.0',
1722+
),
17111723
);
17121724

17131725
/**

WordPress/Tests/WP/DeprecatedFunctionsUnitTest.1.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,6 @@ wp_targeted_link_rel();
441441
wp_targeted_link_rel_callback();
442442
/* ============ WP 6.8 ============ */
443443
wp_add_editor_classic_theme_styles();
444+
/* ============ WP 6.9 ============ */
445+
seems_utf8();
446+
wp_print_auto_sizes_contain_css_fix();

WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,15 @@ public function getWarningList( $testFile = '' ) {
110110
switch ( $testFile ) {
111111
case 'DeprecatedFunctionsUnitTest.1.inc':
112112
$start_line = 426;
113-
$end_line = 443;
113+
$end_line = 446;
114114
$warnings = array_fill( $start_line, ( ( $end_line - $start_line ) + 1 ), 1 );
115115

116116
// Unset the lines related to version comments.
117117
unset(
118118
$warnings[429],
119119
$warnings[432],
120-
$warnings[442]
120+
$warnings[442],
121+
$warnings[444]
121122
);
122123

123124
return $warnings;

0 commit comments

Comments
 (0)