Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ final class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
* Only overrulable constants are listed, i.e. those defined within core within
* a `if ( ! defined() ) {}` wrapper.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 1.0.0
* @since 3.0.0 Renamed from `$whitelisted_core_constants` to `$allowed_core_constants`.
Expand Down Expand Up @@ -203,7 +203,7 @@ final class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
*
* Note: deprecated functions should still be included in this list as plugins may support older WP versions.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0.
*
Expand Down Expand Up @@ -342,7 +342,11 @@ final class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
'wp_cache_flush_group' => true,
'wp_cache_flush_runtime' => true,
'wp_cache_get_multiple' => true,
'wp_cache_get_multiple_salted' => true,
'wp_cache_get_salted' => true,
'wp_cache_set_multiple' => true,
'wp_cache_set_multiple_salted' => true,
'wp_cache_set_salted' => true,
'wp_cache_supports' => true,
'wp_check_password' => true,
'wp_clear_auth_cookie' => true,
Expand Down Expand Up @@ -392,7 +396,7 @@ final class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
*
* Note: deprecated classes should still be included in this list as plugins may support older WP versions.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0.
*
Expand All @@ -407,6 +411,7 @@ final class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
'TwentyTwenty_Walker_Comment' => true,
'TwentyTwenty_Walker_Page' => true,
'Twenty_Twenty_One_Customize' => true,
'WP_Block_Cloner' => true,
'WP_User_Search' => true,
'wp_atom_server' => true, // Deprecated.
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ final class ValidPostTypeSlugSniff extends AbstractFunctionParameterSniff {
*
* Source: {@link https://developer.wordpress.org/reference/functions/register_post_type/#reserved-post-types}
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 2.2.0
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/CapabilitiesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ final class CapabilitiesSniff extends AbstractFunctionParameterSniff {
*
* List is sorted alphabetically.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand Down
37 changes: 30 additions & 7 deletions WordPress/Sniffs/WP/ClassNameCaseSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand Down Expand Up @@ -115,6 +115,10 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'Walker_Page',
'Walker_PageDropdown',
'WP',
'WP_Abilities_Registry',
'WP_Ability',
'WP_Ability_Categories_Registry',
'WP_Ability_Category',
'WP_Admin_Bar',
'WP_Ajax_Response',
'WP_Ajax_Upgrader_Skin',
Expand All @@ -124,6 +128,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'WP_Block',
'WP_Block_Bindings_Registry',
'WP_Block_Bindings_Source',
'WP_Block_Cloner',
'WP_Block_Editor_Context',
'WP_Block_List',
'WP_Block_Metadata_Registry',
Expand All @@ -132,6 +137,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'WP_Block_Parser_Frame',
'WP_Block_Pattern_Categories_Registry',
'WP_Block_Patterns_Registry',
'WP_Block_Processor',
'WP_Block_Styles_Registry',
'WP_Block_Supports',
'WP_Block_Template',
Expand Down Expand Up @@ -269,6 +275,9 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'WP_Privacy_Policy_Content',
'WP_Privacy_Requests_Table',
'WP_Query',
'WP_REST_Abilities_V1_Categories_Controller',
'WP_REST_Abilities_V1_List_Controller',
'WP_REST_Abilities_V1_Run_Controller',
'WP_REST_Application_Passwords_Controller',
'WP_REST_Attachments_Controller',
'WP_REST_Autosaves_Controller',
Expand Down Expand Up @@ -423,7 +432,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand Down Expand Up @@ -455,7 +464,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.1.0
*
Expand All @@ -477,7 +486,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand Down Expand Up @@ -513,25 +522,32 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
* @var string[] The class names in their "proper" case.
* The constructor will add the lowercased class name as a key to each entry.
*/
private $phpmailer_classes = array(
// Classes.
'PHPMailer\\PHPMailer\\DSNConfigurator',
'PHPMailer\\PHPMailer\\Exception',
'PHPMailer\\PHPMailer\\OAuth',
'PHPMailer\\PHPMailer\\PHPMailer',
'PHPMailer\\PHPMailer\\POP3',
'PHPMailer\\PHPMailer\\SMTP',

// Interfaces.
'PHPMailer\\PHPMailer\\OAuthTokenProvider',
);

/**
* List of all Requests classes included in WP Core.
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand Down Expand Up @@ -675,7 +691,7 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
*
* Note: this list will be enhanced in the class constructor.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 3.0.0
*
Expand All @@ -690,6 +706,8 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'SimplePie\Cache\Base',
'SimplePie\Cache\DataCache',
'SimplePie\Cache\NameFilter',
'SimplePie\HTTP\Client',
'SimplePie\HTTP\Response',
'SimplePie\RegistryAware',

// Classes, SimplePie v1.
Expand Down Expand Up @@ -750,7 +768,12 @@ final class ClassNameCaseSniff extends AbstractClassRestrictionsSniff {
'SimplePie\Exception',
'SimplePie\File',
'SimplePie\Gzdecode',
'SimplePie\HTTP\ClientException',
'SimplePie\HTTP\FileClient',
'SimplePie\HTTP\Parser',
'SimplePie\HTTP\Psr7Response',
'SimplePie\HTTP\Psr18Client',
'SimplePie\HTTP\RawTextResponse',
'SimplePie\IRI',
'SimplePie\Item',
'SimplePie\Locator',
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DeprecatedClassesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class DeprecatedClassesSniff extends AbstractClassRestrictionsSniff {
*
* Version numbers should be fully qualified.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @var array
*/
Expand Down
14 changes: 13 additions & 1 deletion WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class DeprecatedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
* To retrieve a function list for comparison, the following tool is available:
* https://github.com/JDGrimes/wp-deprecated-code-scanner
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @var array
*/
Expand Down Expand Up @@ -1708,6 +1708,18 @@ final class DeprecatedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
'alt' => 'wp_enqueue_classic_theme_styles()',
'version' => '6.8.0',
),

// WP 6.9.0.
// Note: the deprecation of the (polyfilled) `utf8_encode()` and `utf8_decode()` functions is deliberately
// not listed here as these are polyfills for the PHP native functions, not WP native functions.
'seems_utf8' => array(
'alt' => 'wp_is_valid_utf8()',
'version' => '6.9.0',
),
'wp_print_auto_sizes_contain_css_fix' => array(
'alt' => 'wp_enqueue_img_auto_sizes_contain_css_fix()',
'version' => '6.9.0',
),
);

/**
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class DeprecatedParameterValuesSniff extends AbstractFunctionParameterSnif
* looking for `_deprecated_argument()`.
* The list is sorted alphabetically by function name.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 1.0.0
* @since 3.0.0 The format of the value has changed to support function calls
Expand Down
9 changes: 8 additions & 1 deletion WordPress/Sniffs/WP/DeprecatedParametersSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
*
* The functions are ordered alphabetically.
*
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
* {@internal To be updated after every major release. Last updated for WordPress 6.9.0-RC2.}
*
* @since 0.12.0
*
Expand Down Expand Up @@ -86,6 +86,13 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
'version' => '5.9.0',
),
),
'_wp_can_use_pcre_u' => array(
1 => array(
'name' => 'set',
'value' => null,
'version' => '6.9.0',
),
),
'_wp_post_revision_fields' => array(
2 => array(
'name' => 'deprecated',
Expand Down
3 changes: 3 additions & 0 deletions WordPress/Tests/WP/DeprecatedFunctionsUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,6 @@ wp_targeted_link_rel();
wp_targeted_link_rel_callback();
/* ============ WP 6.8 ============ */
wp_add_editor_classic_theme_styles();
/* ============ WP 6.9 ============ */
seems_utf8();
wp_print_auto_sizes_contain_css_fix();
5 changes: 3 additions & 2 deletions WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ public function getWarningList( $testFile = '' ) {
switch ( $testFile ) {
case 'DeprecatedFunctionsUnitTest.1.inc':
$start_line = 426;
$end_line = 443;
$end_line = 446;
$warnings = array_fill( $start_line, ( ( $end_line - $start_line ) + 1 ), 1 );

// Unset the lines related to version comments.
unset(
$warnings[429],
$warnings[432],
$warnings[442]
$warnings[442],
$warnings[444]
);

return $warnings;
Expand Down
1 change: 1 addition & 0 deletions WordPress/Tests/WP/DeprecatedParametersUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ global_terms( $foo, 'deprecated' );
// All will give an WARNING as they have been deprecated after WP 6.5.
inject_ignored_hooked_blocks_metadata_attributes('', 'deprecated');
wp_render_elements_support_styles('deprecated');
_wp_can_use_pcre_u('deprecated');
1 change: 1 addition & 0 deletions WordPress/Tests/WP/DeprecatedParametersUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function getWarningList() {
return array(
100 => 1,
101 => 1,
102 => 1,
);
}
}
Loading