Skip to content

Commit

Permalink
[not verified] General: update requirements to match upcoming WP 6.0 …
Browse files Browse the repository at this point in the history
…release (#24083)

* General: update requirements to match upcoming WP 6.0 release

See #24082

* Update minimum version required in Jetpack

* WordPress' git repos now use trunk instead of master

See https://make.wordpress.org/core/2021/11/10/default-git-branch-for-wordpress-wordpress-develop/

That means our master tests have not really been running on the latest dev version of WordPress since last november. :|

* Update array of valid WP branches

* Update menu order id rounding

See https://core.trac.wordpress.org/ticket/40927

* Set up custom stats key values in tests depending on WP version

See https://core.trac.wordpress.org/ticket/40927

* Do not run failing tests on WordPress.com for now

See #24083 (comment)

* Update to use ID instead of id

Co-authored-by: Brandon Kraft <public@brandonkraft.com>
  • Loading branch information
jeherve and kraftbj committed May 19, 2022
1 parent 73f8f0a commit a0b9931
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 33 deletions.
16 changes: 8 additions & 8 deletions .github/files/generate-ci-matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// {string} Node version to use.
'node' => $versions['NODE_VERSION'],

// {string} WordPress version to check out: 'latest', 'previous', 'master', or 'none'.
// {string} WordPress version to check out: 'latest', 'previous', 'trunk', or 'none'.
'wp' => 'none',

// {bool} Whether the check is experimental, i.e. it won't make the workflow fail.
Expand All @@ -58,28 +58,28 @@
'script' => 'test-php',
'php' => $php,
'wp' => 'latest',
'timeout' => 20, // 2022-01-25: 5.6 tests have started timing out at 15 minutes. Previously: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 master run, ~5.5-6 for 7.x and 8.0.
'timeout' => 20, // 2022-01-25: 5.6 tests have started timing out at 15 minutes. Previously: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 trunk run, ~5.5-6 for 7.x and 8.0.
);
}
// Uncomment this once WP master finally works with 8.1. Then merge into the above once WP latest does and we've cleaned up any problems in our own code.
// Uncomment this once WP trunk finally works with 8.1. Then merge into the above once WP latest does and we've cleaned up any problems in our own code.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found, Squiz.Commenting.BlockComment.NoEmptyLineBefore
/*
$matrix[] = array(
'name' => 'PHP tests: PHP 8.1 WP master',
'name' => 'PHP tests: PHP 8.1 WP trunk',
'script' => 'test-php',
'php' => '8.1',
'wp' => 'master',
'wp' => 'trunk',
'timeout' => 15,
'experimental' => true,
);
*/
foreach ( array( 'previous', 'master' ) as $wp ) {
foreach ( array( 'previous', 'trunk' ) as $wp ) {
$matrix[] = array(
'name' => "PHP tests: PHP {$versions['PHP_VERSION']} WP $wp",
'script' => 'test-php',
'php' => $versions['PHP_VERSION'],
'wp' => $wp,
'timeout' => 15, // 2021-01-18: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 master run, ~5.5-6 for 7.x and 8.0.
'timeout' => 15, // 2021-01-18: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 trunk run, ~5.5-6 for 7.x and 8.0.
);
}

Expand Down Expand Up @@ -209,7 +209,7 @@ function join_or( $vals ) {
}

// Only specific values allowed for `wp`.
$valid_wp = array( 'latest', 'previous', 'master', 'none' );
$valid_wp = array( 'latest', 'previous', 'trunk', 'none' );
if ( ! in_array( $m['wp'], $valid_wp, true ) ) {
$valid_wp = join_or(
array_map(
Expand Down
6 changes: 3 additions & 3 deletions .github/files/setup-wordpress-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ echo "::endgroup::"

echo "::group::Preparing WordPress from \"$WP_BRANCH\" branch";
case "$WP_BRANCH" in
master)
git clone --depth=1 --branch master git://develop.git.wordpress.org/ /tmp/wordpress-master
trunk)
git clone --depth=1 --branch trunk git://develop.git.wordpress.org/ /tmp/wordpress-trunk
;;
latest)
LATEST=$(php ./tools/get-wp-version.php)
Expand All @@ -40,7 +40,7 @@ case "$WP_BRANCH" in
previous)
# We hard-code the version here because there's a time near WP releases where
# we've dropped the old 'previous' but WP hasn't actually released the new 'latest'
git clone --depth=1 --branch 5.8 git://develop.git.wordpress.org/ /tmp/wordpress-previous
git clone --depth=1 --branch 5.9 git://develop.git.wordpress.org/ /tmp/wordpress-previous
;;
*)
echo "Unrecognized value for WP_BRANCH: $WP_BRANCH" >&2
Expand Down
2 changes: 1 addition & 1 deletion .phpcs.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- This file configures everything except the list of rules. -->
<!-- The separation is so .github/files/phpcompatibility-dev-phpcs.xml can use the same config with a different rule set. -->
<ruleset>
<config name="minimum_supported_wp_version" value="5.8" />
<config name="minimum_supported_wp_version" value="5.9" />
<config name="testVersion" value="5.6-"/>

<!-- Use our custom filter for `.phpcsignore` and `.phpcs.dir.xml` support. -->
Expand Down
4 changes: 4 additions & 0 deletions projects/packages/sync/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

WordPress 6.1 Compatibilty
6 changes: 3 additions & 3 deletions projects/packages/sync/src/class-users.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ public static function maybe_demote_master_user( $user_id ) {
if ( $user_id === $master_user_id && 'administrator' !== $role ) {
$query = new \WP_User_Query(
array(
'fields' => array( 'id' ),
'fields' => array( 'ID' ),
'role' => 'administrator',
'orderby' => 'id',
'orderby' => 'ID',
'exclude' => array( $master_user_id ),
)
);
$new_master = false;
$connection = new Jetpack_Connection();
foreach ( $query->results as $result ) {
$found_user_id = absint( $result->id );
$found_user_id = absint( $result->ID );
if ( $found_user_id && $connection->is_user_connected( $found_user_id ) ) {
$new_master = $found_user_id;
break;
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/backup/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
4 changes: 2 additions & 2 deletions projects/plugins/backup/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Jetpack Backup ===
Contributors: automattic, bjorsch, fgiannar, jeherve, jwebbdev, kraftbj, macbre, samiff, sermitr, williamvianas
Tags: jetpack
Requires at least: 5.8
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.9
Tested up to: 6.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/boost/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
2 changes: 1 addition & 1 deletion projects/plugins/boost/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: automattic, xwp, adnan007, bjorsch, danwalmsley, davidlonjon, ebin
Donate link: https://automattic.com
Tags: performance, speed, pagespeed, web vitals, critical css, optimize, defer
Requires at least: 5.5
Tested up to: 5.9
Tested up to: 6.0
Requires PHP: 7.0
Stable tag: 1.4.2
License: GPLv2 or later
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: compat

General: Jetpack now requires a more recent version of WordPress (5.9), since a new version of WordPress (6.0) will be available soon.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-wp-compat-60#2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: compat

General: Jetpack is now fully compatible with the upcoming version of WordPress, 6.0.
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author URI: https://jetpack.com
* License: GPL2+
* Text Domain: jetpack
* Requires at least: 5.8
* Requires at least: 5.9
* Requires PHP: 5.6
*
* @package automattic/jetpack
Expand All @@ -30,7 +30,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

define( 'JETPACK__MINIMUM_WP_VERSION', '5.8' );
define( 'JETPACK__MINIMUM_WP_VERSION', '5.9' );
define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
define( 'JETPACK__VERSION', '10.9' );

Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: automattic, adamkheckler, adrianmoldovanwp, aduth, akirk, allendav, alternatekev, andy, annamcphee, annezazu, apeatling, arcangelini, azaozz, batmoo, barry, beaulebens, biskobe, blobaugh, bjorsch, brbrr, cainm, cena, cfinke, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, davoraltman, daniloercoli, delawski, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, egregor, eliorivero, enej, eoigal, erania-pinnera, ethitter, fgiannar, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jblz, jasmussen, jeffgolenski, jeherve, jenhooks, jenia, jessefriedman, jgs, jkudish, jmdodd, joanrho, johnjamesjacoby, jshreve, kbrownkd, keoshi, koke, kraftbj, lancewillett, leogermani, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, mdbitz, MichaelArestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, robertbpugh, roccotripaldi, samhotchkiss, samiff, scarstocea, scottsweb, sdixon194, sdquirk, sermitr, simison, stephdau, tmoorewp, tyxla, Viper007Bond, westi, yoavf, zinigor
Tags: Security, backup, Woo, malware, scan, spam, CDN, search, social
Stable tag: 10.8
Requires at least: 5.8
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.9
Tested up to: 6.0

Improve your WP security with powerful one-click tools like backup and malware scan. Get essential free tools including stats, CDN and social sharing.

Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/protect/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
4 changes: 2 additions & 2 deletions projects/plugins/protect/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Jetpack Protect ===
Contributors: automattic,
Tags: jetpack, stuff
Requires at least: 5.8
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.9
Tested up to: 6.0
Stable tag: 0.1.0-alpha
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/search/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
4 changes: 2 additions & 2 deletions projects/plugins/search/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Jetpack jetpack-search ===
Contributors: automattic,
Tags: jetpack, search
Requires at least: 5.7
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.8
Tested up to: 6.0
Stable tag: 0.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/social/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
4 changes: 2 additions & 2 deletions projects/plugins/social/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Jetpack Social ===
Contributors: automattic,
Tags: jetpack, stuff
Requires at least: 5.8
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.9
Tested up to: 6.0
Stable tag: 0.1.0-alpha
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/starter-plugin/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
4 changes: 2 additions & 2 deletions projects/plugins/starter-plugin/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Jetpack Starter Plugin ===
Contributors: automattic,
Tags: jetpack, stuff
Requires at least: 5.8
Requires at least: 5.9
Requires PHP: 5.6
Tested up to: 5.9
Tested up to: 6.0
Stable tag: 0.1.0-alpha
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/vaultpress/changelog/update-wp-compat-60
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out.
2 changes: 1 addition & 1 deletion projects/plugins/vaultpress/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: automattic, annezazu, apokalyptik, bjorsch, briancolinger, dsmart, georgestephanis, jeherve, josephscott, miguelxavierpenha, rachelsquirrel, rdcoll, sdixon194, shaunandrews, thingalon, viper007bond, williamvianas, xknown
Tags: security, malware, virus, archive, back up, back ups, backup, backups, scanning, restore, wordpress backup, site backup, website backup
Requires at least: 5.2
Tested up to: 5.9
Tested up to: 6.0
Stable tag: 2.2.0
Requires PHP: 5.6
License: GPLv2
Expand Down
4 changes: 2 additions & 2 deletions tools/cli/commands/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ function createReadMeTxt( answers ) {
`=== Jetpack ${ answers.name } ===\n` +
'Contributors: automattic,\n' +
'Tags: jetpack, stuff\n' +
'Requires at least: 5.8\n' +
'Requires at least: 5.9\n' +
'Requires PHP: 5.6\n' +
'Tested up to: 5.9\n' +
'Tested up to: 6.0\n' +
`Stable tag: ${ answers.version }\n` +
'License: GPLv2 or later\n' +
'License URI: http://www.gnu.org/licenses/gpl-2.0.html\n' +
Expand Down

0 comments on commit a0b9931

Please sign in to comment.