Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compatibility layer for WP 6.2 #56464

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Conversation

tellthemachines
Copy link
Contributor

What?

Gutenberg only supports the current and previous WP version, so now that 6.4 is out, the compatibility files supporting 6.2 can be removed. This PR removes those files and fixes any obvious resulting fatals, but I'd thank everyone, especially those who have made PHP changes recently, to test that stuff is still working!

For reference, the corresponding PR after 6.3: #53451

Testing Instructions

Open all the pages, click around, check nothing's broken. In particular, there's a lot of changes in here related to templates, patterns, navigation and revisions so those areas are good to pay special attention to.

@tellthemachines tellthemachines added Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Code Quality Issues or PRs that relate to code quality labels Nov 23, 2023
@tellthemachines tellthemachines requested a review from a team November 23, 2023 04:22
@tellthemachines tellthemachines self-assigned this Nov 23, 2023
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-block-patterns-controller.php
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-global-styles-revisions-controller-6-4.php
❔ lib/experimental/class-gutenberg-rest-template-revision-count.php
❔ lib/load.php

@@ -3,7 +3,7 @@
* Plugin Name: Gutenberg
* Plugin URI: https://github.com/WordPress/gutenberg
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
* Requires at least: 6.2
* Requires at least: 6.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also require changing the commit SHA for the performance test. See #54107 (comment).

Copy link
Contributor Author

@tellthemachines tellthemachines Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The perf tests are already failing on trunk since #56427

The commit hash was updated here but tests are still failing; we probably need to pick another commit 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried another commit based on the logic you used in #54111; let's see if it works 🤞

@gziolo
Copy link
Member

gziolo commented Nov 23, 2023

PHPUnit test failures were reported on CI, which is reasonably expected when removing unused classes and functions:

Screenshot 2023-11-23 at 08 43 27

In the past, we either tweaked the tests if they still made sense in Gutenberg or we removed them in favor of test coverage in WordPress core.

@ramonjd
Copy link
Member

ramonjd commented Nov 24, 2023

Checked behaviour of Global styles revisions (Gutenberg_REST_Global_Styles_Revisions_Controller_6_3 removed) ✅

Also did a general smoke test of:

  • site editor (editing and saving navigation, patterns, templates)
  • foot notes (in post editor and in the site editor pages editor)

we removed them in favor of test coverage in WordPress core.

I've been meaning to prune Gutenberg_REST_Global_Styles_Revisions_Controller_Test, I'll get a PR to do this in light of this PR

@tellthemachines tellthemachines force-pushed the remove/6-2-compatibility branch from bf29e2d to 8270be8 Compare November 24, 2023 02:47
@tellthemachines tellthemachines force-pushed the remove/6-2-compatibility branch from 8a7a9b4 to d07d722 Compare November 24, 2023 03:25
@tellthemachines
Copy link
Contributor Author

Thanks for the reviews and testing, folks!

PHPUnit test failures were reported on CI

I removed the two failing tests suites as they are already in core here and hereand it doesn't make sense to keep them in Gutenberg after removing the classes.

Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

I've done some general testing on viewing, editing, and saving:

  • Navigation
  • Patterns
  • Templates
  • Footnotes
  • Revisions

Everything is looking good to me 👍 I didn't see any errors and all worked as expected.

@tellthemachines
Copy link
Contributor Author

Thanks for testing everyone! I did a further round of testing too and everything seems to be working correctly. I think this is ready for a final review!

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Navigation
  • Patterns
  • Templates
  • Footnotes
  • Revisions

I've just given this PR a smoke test with all these, too, while running 6.3 with this PR applied. All looking good to me as well.

Since none of us have run into any issues in testing and a few of us have tested it out now, I reckon this is good to try! ✨

@tellthemachines tellthemachines merged commit 26d96b6 into trunk Nov 27, 2023
51 checks passed
@tellthemachines tellthemachines deleted the remove/6-2-compatibility branch November 27, 2023 00:52
@github-actions github-actions bot added this to the Gutenberg 17.2 milestone Nov 27, 2023
@getdave
Copy link
Contributor

getdave commented Jan 22, 2024

✅ I updated the PHP Sync Tracking Issue for WP 6.5 to note this PR does not require a backport for WP 6.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants