From ddef12dbb3800f8b83729a4a6fcc53429b67d1d4 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 1 Oct 2024 17:50:18 +0200 Subject: [PATCH 1/3] Address deprecations in test code --- features/command.feature | 3 +++ 1 file changed, 3 insertions(+) diff --git a/features/command.feature b/features/command.feature index 26242b4df..99d1e1d9d 100644 --- a/features/command.feature +++ b/features/command.feature @@ -383,6 +383,7 @@ Feature: WP-CLI Commands """ prefix = $prefix; @@ -478,6 +479,7 @@ Feature: WP-CLI Commands """ message = $message; @@ -1119,6 +1121,7 @@ Feature: WP-CLI Commands """ message = $message; From 7312d928a93cd88d30f41d00216c9b88b1ca9600 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 1 Oct 2024 17:50:47 +0200 Subject: [PATCH 2/3] Skip Requests v1 test on PHP 8.2+ This test runs WP-CLI 2.7.0 via Composer, which causes deprecation warnings on PHP 8.2 --- features/requests.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/requests.feature b/features/requests.feature index fc96d21c2..84061df18 100644 --- a/features/requests.feature +++ b/features/requests.feature @@ -1,7 +1,8 @@ Feature: Requests integration with both v1 and v2 # This test downgrades to WordPress 5.8, but the SQLite plugin requires 6.0+ - @require-mysql + # WP-CLI 2.7 causes deprecation warnings on PHP 8.2 + @require-mysql @less-than-php-8.2 Scenario: Composer stack with Requests v1 Given an empty directory And a composer.json file: From 1df0e7a788acfca0482099e00e82159d54a64b05 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 1 Oct 2024 18:05:45 +0200 Subject: [PATCH 3/3] Fix trunk tests --- features/requests.feature | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/requests.feature b/features/requests.feature index 84061df18..5ba554b55 100644 --- a/features/requests.feature +++ b/features/requests.feature @@ -79,6 +79,10 @@ Feature: Requests integration with both v1 and v2 Scenario: Current version with WordPress-bundled Requests v2 Given a WP installation + # Switch themes because twentytwentyfive requires a version newer than 6.2 + # and it would otherwise cause a fatal error further down. + And I try `wp theme install twentyten` + And I try `wp theme activate twentyten` And I run `wp core update --version=6.2 --force` When I run `wp core version`