Skip to content

Commit 6f3ef87

Browse files
committed
build: transpile from 4.5.13
1 parent c48d6cd commit 6f3ef87

15 files changed

Lines changed: 1189 additions & 387 deletions

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111
### Changed
1212

1313
- Guard `setAccessible()` Reflection method calls with a `PHP_VERSION_ID` check to skip the no-op call on PHP >= 8.1. (thanks @BrianHenryIE)
14-
- Update the WordPress Core PHPUnit suite
15-
- Update the SQLite database integration plugin from version `2.2.14` to version `2.2.16`
14+
- Update Core PHPUnit test suite to latest version.
15+
- Update the SQLite database integration plugin from version `2.2.14` to version `2.2.17`
1616

1717
## [3.7.16] 2025-11-22;
1818

includes/core-phpunit/includes/abstract-testcase.php

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static function get_called_class() {
6464

6565
/**
6666
* Runs the routine before setting up all tests.
67+
*
68+
* @global wpdb $wpdb WordPress database abstraction object.
6769
*/
6870
public static function set_up_before_class() {
6971
global $wpdb;
@@ -108,8 +110,12 @@ public static function tear_down_after_class() {
108110

109111
/**
110112
* Runs the routine before each test is executed.
113+
*
114+
* @global WP_Rewrite $wp_rewrite WordPress rewrite rules object.
111115
*/
112116
public function set_up() {
117+
global $wp_rewrite;
118+
113119
set_time_limit( 0 );
114120

115121
$this->factory = static::factory();
@@ -122,8 +128,6 @@ public function set_up() {
122128
$this->_backup_hooks();
123129
}
124130

125-
global $wp_rewrite;
126-
127131
$this->clean_up_global_scope();
128132

129133
/*
@@ -165,10 +169,17 @@ public function wp_hash_password_options( array $options, string $algorithm ): a
165169

166170
/**
167171
* After a test method runs, resets any state in WordPress the test method might have changed.
172+
*
173+
* @global wpdb $wpdb WordPress database abstraction object.
174+
* @global WP_Query $wp_the_query Main WordPress query object.
175+
* @global WP_Query $wp_query WordPress query object.
176+
* @global WP $wp WordPress environment object.
168177
*/
169178
public function tear_down() {
170179
global $wpdb, $wp_the_query, $wp_query, $wp;
180+
171181
$wpdb->query( 'ROLLBACK' );
182+
172183
if ( is_multisite() ) {
173184
while ( ms_is_switched() ) {
174185
restore_current_blog();
@@ -369,10 +380,10 @@ protected function reset__SERVER() {
369380
* Stores $wp_filter, $wp_actions, $wp_filters, and $wp_current_filter
370381
* on a class variable so they can be restored on tear_down() using _restore_hooks().
371382
*
372-
* @global array $wp_filter
373-
* @global array $wp_actions
374-
* @global array $wp_filters
375-
* @global array $wp_current_filter
383+
* @global array $wp_filter All of the filters and actions.
384+
* @global array $wp_actions The number of times each action was triggered.
385+
* @global array $wp_filters The number of times each filter was triggered.
386+
* @global array $wp_current_filter The list of current filters with the current one last.
376387
*/
377388
protected function _backup_hooks() {
378389
self::$hooks_saved['wp_filter'] = array();
@@ -392,10 +403,10 @@ protected function _backup_hooks() {
392403
* Restores the hook-related globals to their state at set_up()
393404
* so that future tests aren't affected by hooks set during this last test.
394405
*
395-
* @global array $wp_filter
396-
* @global array $wp_actions
397-
* @global array $wp_filters
398-
* @global array $wp_current_filter
406+
* @global array $wp_filter All of the filters and actions.
407+
* @global array $wp_actions The number of times each action was triggered.
408+
* @global array $wp_filters The number of times each filter was triggered.
409+
* @global array $wp_current_filter The list of current filters with the current one last.
399410
*/
400411
protected function _restore_hooks() {
401412
if ( isset( self::$hooks_saved['wp_filter'] ) ) {
@@ -417,6 +428,8 @@ protected function _restore_hooks() {
417428

418429
/**
419430
* Flushes the WordPress object cache.
431+
*
432+
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache object.
420433
*/
421434
public static function flush_cache() {
422435
global $wp_object_cache;
@@ -462,13 +475,15 @@ public static function flush_cache() {
462475
*
463476
* @since 5.1.0
464477
*
465-
* @global array $wp_meta_keys
478+
* @global array $wp_meta_keys Global registry for meta keys.
466479
*/
467480
public function unregister_all_meta_keys() {
468481
global $wp_meta_keys;
482+
469483
if ( ! is_array( $wp_meta_keys ) ) {
470484
return;
471485
}
486+
472487
foreach ( $wp_meta_keys as $object_type => $type_keys ) {
473488
foreach ( $type_keys as $object_subtype => $subtype_keys ) {
474489
foreach ( $subtype_keys as $key => $value ) {
@@ -480,11 +495,15 @@ public function unregister_all_meta_keys() {
480495

481496
/**
482497
* Starts a database transaction.
498+
*
499+
* @global wpdb $wpdb WordPress database abstraction object.
483500
*/
484501
public function start_transaction() {
485502
global $wpdb;
503+
486504
$wpdb->query( 'SET autocommit = 0;' );
487505
$wpdb->query( 'START TRANSACTION;' );
506+
488507
add_filter( 'query', array( $this, '_create_temporary_tables' ) );
489508
add_filter( 'query', array( $this, '_drop_temporary_tables' ) );
490509
}
@@ -493,9 +512,12 @@ public function start_transaction() {
493512
* Commits the queries in a transaction.
494513
*
495514
* @since 4.1.0
515+
*
516+
* @global wpdb $wpdb WordPress database abstraction object.
496517
*/
497518
public static function commit_transaction() {
498519
global $wpdb;
520+
499521
$wpdb->query( 'COMMIT;' );
500522
}
501523

@@ -1150,6 +1172,8 @@ public function normalizeDirectorySeparatorsInPath( $path ) {
11501172
* @since 5.3.0 Formalized the existing `...$prop` parameter by adding it
11511173
* to the function signature.
11521174
*
1175+
* @global WP_Query $wp_query WordPress Query object.
1176+
*
11531177
* @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
11541178
*/
11551179
public function assertQueryTrue( ...$prop ) {
@@ -1649,7 +1673,7 @@ public static function delete_user( $user_id ) {
16491673
*
16501674
* @since 4.4.0
16511675
*
1652-
* @global WP_Rewrite $wp_rewrite
1676+
* @global WP_Rewrite $wp_rewrite WordPress rewrite rules object.
16531677
*
16541678
* @param string $structure Optional. Permalink structure to set. Default empty.
16551679
*/

includes/core-phpunit/includes/build-visual-html-tree.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
/* phpcs:disable WordPress.Security.EscapeOutput.ExceptionNotEscaped */
4-
53
/**
64
* Generates representation of the semantic HTML tree structure.
75
*
@@ -201,7 +199,7 @@ static function ( $a, $b ) {
201199
case '#cdata-section':
202200
case '#text':
203201
$text_content = $processor->get_modifiable_text();
204-
if ( '' === trim( $text_content, " \f\t\r\n" ) ) {
202+
if ( '' === $text_content ) {
205203
break;
206204
}
207205
$was_text = true;
@@ -236,7 +234,7 @@ static function ( $a, $b ) {
236234
++$indent_level;
237235
}
238236

239-
// If they're no attributes, we're done here.
237+
// When no attributes are present, there’s nothing left to do.
240238
if ( empty( $block_attrs ) ) {
241239
break;
242240
}
@@ -277,7 +275,6 @@ static function ( $a, $b ) {
277275
}
278276
break;
279277
default:
280-
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
281278
$serialized_token_type = var_export( $processor->get_token_type(), true );
282279
throw new Exception( "Unhandled token type for tree construction: {$serialized_token_type}" );
283280
}
Lines changed: 12 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,14 @@
11
<?php
22

3-
// This file was autogenerated by tools/release/sync-stable-blocks.js, do not change manually!
4-
remove_action( 'init', 'register_block_core_accordion' );
5-
remove_action( 'init', 'register_block_core_accordion_item' );
6-
remove_action( 'init', 'register_block_core_archives' );
7-
remove_action( 'init', 'register_block_core_avatar' );
8-
remove_action( 'init', 'register_block_core_block' );
9-
remove_action( 'init', 'register_block_core_button' );
10-
remove_action( 'init', 'register_block_core_calendar' );
11-
remove_action( 'init', 'register_block_core_categories' );
12-
remove_action( 'init', 'register_block_core_comment_author_name' );
13-
remove_action( 'init', 'register_block_core_comment_content' );
14-
remove_action( 'init', 'register_block_core_comment_date' );
15-
remove_action( 'init', 'register_block_core_comment_edit_link' );
16-
remove_action( 'init', 'register_block_core_comment_reply_link' );
17-
remove_action( 'init', 'register_block_core_comment_template' );
18-
remove_action( 'init', 'register_block_core_comments' );
19-
remove_action( 'init', 'register_block_core_comments_pagination' );
20-
remove_action( 'init', 'register_block_core_comments_pagination_next' );
21-
remove_action( 'init', 'register_block_core_comments_pagination_numbers' );
22-
remove_action( 'init', 'register_block_core_comments_pagination_previous' );
23-
remove_action( 'init', 'register_block_core_comments_title' );
24-
remove_action( 'init', 'register_block_core_cover' );
25-
remove_action( 'init', 'register_block_core_file' );
26-
remove_action( 'init', 'register_block_core_footnotes' );
27-
remove_action( 'init', 'register_block_core_gallery' );
28-
remove_action( 'init', 'register_block_core_heading' );
29-
remove_action( 'init', 'register_block_core_home_link' );
30-
remove_action( 'init', 'register_block_core_image' );
31-
remove_action( 'init', 'register_block_core_latest_comments' );
32-
remove_action( 'init', 'register_block_core_latest_posts' );
33-
remove_action( 'init', 'register_block_core_list' );
34-
remove_action( 'init', 'register_block_core_loginout' );
35-
remove_action( 'init', 'register_block_core_media_text' );
36-
remove_action( 'init', 'register_block_core_navigation' );
37-
remove_action( 'init', 'register_block_core_navigation_link' );
38-
remove_action( 'init', 'register_block_core_navigation_submenu' );
39-
remove_action( 'init', 'register_block_core_page_list' );
40-
remove_action( 'init', 'register_block_core_page_list_item' );
41-
remove_action( 'init', 'register_block_core_pattern' );
42-
remove_action( 'init', 'register_block_core_post_author' );
43-
remove_action( 'init', 'register_block_core_post_author_biography' );
44-
remove_action( 'init', 'register_block_core_post_author_name' );
45-
remove_action( 'init', 'register_block_core_post_comments_count' );
46-
remove_action( 'init', 'register_block_core_post_comments_form' );
47-
remove_action( 'init', 'register_block_core_post_comments_link' );
48-
remove_action( 'init', 'register_block_core_post_content' );
49-
remove_action( 'init', 'register_block_core_post_date' );
50-
remove_action( 'init', 'register_block_core_post_excerpt' );
51-
remove_action( 'init', 'register_block_core_post_featured_image' );
52-
remove_action( 'init', 'register_block_core_post_navigation_link' );
53-
remove_action( 'init', 'register_block_core_post_template' );
54-
remove_action( 'init', 'register_block_core_post_terms' );
55-
remove_action( 'init', 'register_block_core_post_time_to_read' );
56-
remove_action( 'init', 'register_block_core_post_title' );
57-
remove_action( 'init', 'register_block_core_query' );
58-
remove_action( 'init', 'register_block_core_query_no_results' );
59-
remove_action( 'init', 'register_block_core_query_pagination' );
60-
remove_action( 'init', 'register_block_core_query_pagination_next' );
61-
remove_action( 'init', 'register_block_core_query_pagination_numbers' );
62-
remove_action( 'init', 'register_block_core_query_pagination_previous' );
63-
remove_action( 'init', 'register_block_core_query_title' );
64-
remove_action( 'init', 'register_block_core_query_total' );
65-
remove_action( 'init', 'register_block_core_read_more' );
66-
remove_action( 'init', 'register_block_core_rss' );
67-
remove_action( 'init', 'register_block_core_search' );
68-
remove_action( 'init', 'register_block_core_shortcode' );
69-
remove_action( 'init', 'register_block_core_site_logo' );
70-
remove_action( 'init', 'register_block_core_site_tagline' );
71-
remove_action( 'init', 'register_block_core_site_title' );
72-
remove_action( 'init', 'register_block_core_social_link' );
73-
remove_action( 'init', 'register_block_core_tag_cloud' );
74-
remove_action( 'init', 'register_block_core_template_part' );
75-
remove_action( 'init', 'register_block_core_term_count' );
76-
remove_action( 'init', 'register_block_core_term_description' );
77-
remove_action( 'init', 'register_block_core_term_name' );
78-
remove_action( 'init', 'register_block_core_term_template' );
79-
remove_action( 'init', 'register_block_core_video' );
3+
// Unhook block registration functions to prevent _doing_it_wrong warnings
4+
// when tests re-trigger the init action. See _unhook_block_registration().
5+
$blocks_dir = ABSPATH . WPINC . '/blocks/';
6+
foreach ( glob( $blocks_dir . '*.php' ) as $block_file ) {
7+
$block_name = basename( $block_file, '.php' );
8+
9+
if ( ! is_dir( $blocks_dir . $block_name ) ) {
10+
continue;
11+
}
12+
13+
remove_action( 'init', 'register_block_core_' . str_replace( '-', '_', $block_name ) );
14+
}

includes/sqlite-database-integration/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: SQLite Database Integration
44
* Description: SQLite database driver drop-in.
55
* Author: The WordPress Team
6-
* Version: 2.2.16
6+
* Version: 2.2.17
77
* Requires PHP: 7.2
88
* Textdomain: sqlite-database-integration
99
*

includes/sqlite-database-integration/readme.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: wordpressdotorg, aristath, janjakes, zieladam, berislav.grgic
44
Requires at least: 6.4
55
Tested up to: 6.9
66
Requires PHP: 7.2
7-
Stable tag: 2.2.16
7+
Stable tag: 2.2.17
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010
Tags: performance, database
@@ -36,3 +36,12 @@ Feedback is encouraged and much appreciated, especially since this plugin is a f
3636
= How can I contribute to the plugin? =
3737

3838
Contributions are always welcome! Learn more about how to get involved in the [Core Performance Team Handbook](https://make.wordpress.org/performance/handbook/get-involved/).
39+
40+
= Does this plugin change how WordPress queries are executed? =
41+
42+
The plugin replaces the default MySQL-based database layer with an
43+
SQLite-backed implementation. Core WordPress code continues to use
44+
the wpdb API, while queries are internally adapted to be compatible
45+
with SQLite syntax and behavior.
46+
47+

includes/sqlite-database-integration/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
*
66
* This constant needs to be updated on plugin release!
77
*/
8-
define( 'SQLITE_DRIVER_VERSION', '2.2.16' );
8+
define( 'SQLITE_DRIVER_VERSION', '2.2.17' );

0 commit comments

Comments
 (0)