Skip to content

Commit 3a21502

Browse files
chriszaratechriszarateingeniumed
authored andcommitted
Align collaboration migration version markers with the 23.8.0 release (#81789)
The legacy-option cleanup migration merged in #80658 was marked 23.7.0, but 23.7.2 has already shipped without it; the migration actually lands in 23.8.0. Update the migration constant, version gate, and @SInCE tag, and seed the upgrade test from 23.7.2 to cover sites upgrading from the already-shipped 23.7.x releases. Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
1 parent f7ac645 commit 3a21502

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎lib/upgrade.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
if ( ! defined( '_GUTENBERG_VERSION_MIGRATION' ) ) {
99
// It's necessary to update this version every time a new migration is needed.
10-
define( '_GUTENBERG_VERSION_MIGRATION', '23.7.0' );
10+
define( '_GUTENBERG_VERSION_MIGRATION', '23.8.0' );
1111
}
1212

1313
/**
@@ -25,7 +25,7 @@ function _gutenberg_migrate_database() {
2525
_gutenberg_migrate_remove_fse_drafts();
2626
}
2727

28-
if ( version_compare( $gutenberg_installed_version, '23.7.0', '<' ) ) {
28+
if ( version_compare( $gutenberg_installed_version, '23.8.0', '<' ) ) {
2929
_gutenberg_migrate_remove_legacy_collaboration_options();
3030
}
3131

@@ -70,7 +70,7 @@ function _gutenberg_migrate_remove_fse_drafts() {
7070
* collaboration is now opt-in, so existing sites must explicitly enable the
7171
* experiment instead of being opted in by a legacy setting.
7272
*
73-
* @since 23.7.0
73+
* @since 23.8.0
7474
*/
7575
function _gutenberg_migrate_remove_legacy_collaboration_options() {
7676
delete_option( 'enable_real_time_collaboration' );

‎phpunit/tests/collaboration/collaborationUpgrade.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ private function get_stored_option( $option_name ) {
4848
}
4949

5050
public function test_removes_legacy_collaboration_options_without_enabling_the_experiment() {
51-
update_option( 'gutenberg_version_migration', '22.8.0' );
51+
// 23.7.2 shipped without this migration, so sites upgrading from any
52+
// 23.7.x release must still run it.
53+
update_option( 'gutenberg_version_migration', '23.7.2' );
5254
update_option( 'enable_real_time_collaboration', '1' );
5355
update_option( 'wp_enable_real_time_collaboration', '1' );
5456
update_option( 'wp_collaboration_enabled', '1' );

0 commit comments

Comments
 (0)