Skip to content

Commit

Permalink
Merge pull request #6126 from Automattic/develop
Browse files Browse the repository at this point in the history
Staging release: v20250204.1
  • Loading branch information
rinatkhaziev authored Feb 4, 2025
2 parents 1b1d609 + 91a9c0f commit e19148c
Show file tree
Hide file tree
Showing 65 changed files with 1,545 additions and 848 deletions.
2 changes: 1 addition & 1 deletion .github/actions/run-wp-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ runs:
"${PHPUNIT}" ${OPTIONS}
- name: Upload coverage report
uses: codecov/codecov-action@v5.1.2
uses: codecov/codecov-action@v5.3.1
with:
files: ${{ inputs.coverage-file }}
flags: ${{ inputs.coverage-flags }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog-summary-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: softprops/[email protected].0
- uses: softprops/[email protected].1
with:
generate_release_notes: true
tag_name: ${{ steps.id-generator.outputs.id }}
Expand All @@ -64,7 +64,7 @@ jobs:
uses: actions/[email protected]

- name: Setup PHP
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.32.0

- name: Install
uses: ramsey/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-summary-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/[email protected]

- name: Setup PHP
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.32.0

- name: Install
uses: ramsey/[email protected]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
matrix:
config:
# PHP 8.1, Jetpack
- { wp: 6.1.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.1.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.2.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.2.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.3.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
uses: actions/[email protected]

- name: Initialize CodeQL
uses: github/codeql-action/[email protected].1
uses: github/codeql-action/[email protected].8
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected].1
uses: github/codeql-action/[email protected].8
2 changes: 1 addition & 1 deletion .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
cache-dependency-path: 'wordpress/package-lock.json'

- name: Set up PHP
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.32.0
with:
php-version: 8.0
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/[email protected]

- name: Set up PHP
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.32.0
with:
coverage: none
env:
Expand Down
17 changes: 11 additions & 6 deletions __tests__/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"phpcompatibility/phpcompatibility-wp": "2.1.6",
"erusev/parsedown": "1.7.4",
"dms/phpunit-arraysubset-asserts": "0.5.0",
"yoast/phpunit-polyfills": "3.0.0",
"yoast/phpunit-polyfills": "3.1.1",
"johnpbloch/wordpress-core": "6.7.1",
"wp-phpunit/wp-phpunit": "6.7.1",
"wp-cli/wp-cli": "2.11.0"
Expand Down
36 changes: 18 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
function vip_default_jetpack_version() {
global $wp_version;

if ( version_compare( $wp_version, '6.2', '<' ) ) {
// WordPress 6.1.x
return '12.5';
} elseif ( version_compare( $wp_version, '6.3', '<' ) ) {
if ( version_compare( $wp_version, '6.3', '<' ) ) {
// WordPress 6.2.x.
return '12.8';
} elseif ( version_compare( $wp_version, '6.4', '<' ) ) {
Expand Down
6 changes: 4 additions & 2 deletions query-monitor/assets/query-monitor.css
Original file line number Diff line number Diff line change
Expand Up @@ -1472,13 +1472,15 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
padding: 0 0 1em 1em !important;
}
#qm-fatal li {
margin: 0 0 0.7em !important;
list-style: none !important;
margin: 0 0 0.7em 1em !important;
}
#qm-fatal .qm-info {
/* @TODO */
color: #666 !important;
}
#qm-fatal a.qm-edit-link svg {
display: none;
}

body#error-page #qm-fatal {
margin: 0 !important;
Expand Down
2 changes: 1 addition & 1 deletion query-monitor/classes/Backtrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class QM_Backtrace {
* @param array<string, mixed[]> $args
* @param mixed[] $trace
*/
public function __construct( array $args = array(), array $trace = null ) {
public function __construct( array $args = array(), ?array $trace = null ) {
$this->trace = $trace ?? debug_backtrace( 0 );

$this->args = array_merge( array(
Expand Down
2 changes: 1 addition & 1 deletion query-monitor/classes/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function enable() {
* @param string $file
* @return self
*/
public static function init( $file = null ) {
public static function init( ?string $file = null ) {

static $instance = null;

Expand Down
5 changes: 0 additions & 5 deletions query-monitor/classes/Collector_Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,6 @@ protected static function get_script_modules(): ?array {
return null;
}

// https://core.trac.wordpress.org/ticket/60596
if ( ! did_action( 'wp_head' ) ) {
return null;
}

$reflector = new ReflectionClass( $modules );

$get_marked_for_enqueue = $reflector->getMethod( 'get_marked_for_enqueue' );
Expand Down
15 changes: 15 additions & 0 deletions query-monitor/classes/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ public function __construct( QM_Plugin $qm ) {
*/
abstract public function is_active();

/**
* @param string $message
* @param mixed[] $e
* @phpstan-param array{
* message: string,
* file: string,
* line: int,
* type?: int,
* trace?: mixed|null,
* } $e
*/
public function output_fatal( $message, array $e ): void {
print_r( $e );
}

/**
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion query-monitor/classes/QueryMonitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function action_cease() {
* @param string $file
* @return self
*/
public static function init( $file = null ) {
public static function init( ?string $file = null ) {

static $instance = null;

Expand Down
8 changes: 4 additions & 4 deletions query-monitor/classes/Timer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class QM_Timer {
* @param mixed[] $data
* @return self
*/
public function start( array $data = null ) {
public function start( ?array $data = null ) {
$this->trace = new QM_Backtrace();
$this->start = array(
'time' => microtime( true ),
Expand All @@ -60,7 +60,7 @@ public function start( array $data = null ) {
* @param mixed[] $data
* @return self
*/
public function stop( array $data = null ) {
public function stop( ?array $data = null ) {

$this->end = array(
'time' => microtime( true ),
Expand All @@ -77,7 +77,7 @@ public function stop( array $data = null ) {
* @param string $name
* @return self
*/
public function lap( array $data = null, $name = null ) {
public function lap( ?array $data = null, ?string $name = null ) {

$lap = array(
'time' => microtime( true ),
Expand Down Expand Up @@ -176,7 +176,7 @@ public function get_trace() {
* @param mixed[] $data
* @return self
*/
public function end( array $data = null ) {
public function end( ?array $data = null ) {
return $this->stop( $data );
}

Expand Down
14 changes: 9 additions & 5 deletions query-monitor/classes/debug_bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ public function ensure_ajaxurl() {
$dispatcher = QM_Dispatchers::get( 'html' );

if ( $this->panels && $dispatcher && $dispatcher::user_can_view() ) {
?>
<script type="text/javascript">
var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>';
</script>
<?php
wp_print_inline_script_tag(
sprintf(
"var ajaxurl = '%s';",
esc_url_raw( admin_url( 'admin-ajax.php' ) )
),
array(
'id' => 'query-monitor-inline-debug-bar',
)
);
}
}

Expand Down
Loading

0 comments on commit e19148c

Please sign in to comment.