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

General: remove WP 6.1 backwards compatibility checks #32772

Merged
merged 17 commits into from
Sep 5, 2023

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Aug 30, 2023

Proposed changes:

This removes backwards compatibility checks for WordPress 6.1, since our plugins will now require WP 6.2 (see #32762).

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

  1. Is CI happy?
  2. Check the different apps impacted by this change.

See #31638

This mostly removes checks that were added in #28710
@github-actions github-actions bot added [Package] Ad aka WordAds [Package] Backup [Package] Connection [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] My Jetpack [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] VideoPress [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Tests] Includes Tests Admin Page React-powered dashboard under the Jetpack menu labels Aug 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 30, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Beta plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

Jetpack plugin:

  • Next scheduled release: September 19, 2023.
  • Scheduled code freeze: September 11, 2023.

Boost plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

Social plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

Starter Plugin plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

Protect plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

Migration plugin:

  • Next scheduled release: October 3, 2023.
  • Scheduled code freeze: September 25, 2023.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 30, 2023

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta > Jetpack and enable the update/wp-61-backcompat-janitorial branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/wp-61-backcompat-janitorial
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

const container = document.getElementById( 'jetpack-backup-root' );

if ( null === container ) {
return;
}

// @todo: Remove fallback when we drop support for WP 6.1
const component = (
render(
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you got all these backwards. It's the if case (using createRoot().render()) that needs to be kept, not the else case.

See https://github.com/Automattic/jetpack/actions/runs/6029259977/job/16358366809?pr=32772#step:9:695 for the problem this causes.

@github-actions github-actions bot added [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Package] Google Fonts Provider This package no longer exists in the monorepo. [Package] WAF E2E Tests labels Aug 31, 2023
function_exists( 'wp_theme_has_theme_json' ) ? wp_theme_has_theme_json() : WP_Theme_JSON_Resolver::theme_has_support()
) && function_exists( 'wp_register_webfont_provider' ) && function_exists( 'wp_register_webfonts' ),
'webfonts' => wp_theme_has_theme_json()
&& ( function_exists( 'wp_register_webfont_provider' ) || function_exists( 'wp_register_webfonts' ) ),
Copy link
Member Author

Choose a reason for hiding this comment

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

wp_register_webfonts and wp_register_webfont_provider are not yet in Core.

@github-actions github-actions bot added [Feature] Shortcodes / Embeds [Feature] Widget Visibility [Package] Status [Plugin] Beta For serving live branches and the beta versions. https://github.com/automattic/jetpack-beta labels Aug 31, 2023
@jeherve
Copy link
Member Author

jeherve commented Aug 31, 2023

I took care of the comments you left above, thanks for the feedback!

Did a search for function_exists being called on wp_-prefixed functions. Not entirely sure these can all be removed, since often enough WordPress doesn't load files in some entry points (and sometimes wpcom lacks functions loaded even if WP itself would have them).

I like that idea, that's a clever way to find things that can maybe be removed. I took a look and removed those that seemed safe to remove. 👍

@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Aug 31, 2023
anomiex
anomiex previously approved these changes Sep 4, 2023
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Let's go for it.

@jeherve jeherve enabled auto-merge (squash) September 5, 2023 05:57
@jeherve
Copy link
Member Author

jeherve commented Sep 5, 2023

This will need another review after bumping package versions. Thank you!

@jeherve jeherve merged commit 27c040a into trunk Sep 5, 2023
@jeherve jeherve deleted the update/wp-61-backcompat-janitorial branch September 5, 2023 13:23
@github-actions github-actions bot removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu E2E Tests [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Feature] Shortcodes / Embeds [Feature] Widget Visibility General [Package] Ad aka WordAds [Package] Backup [Package] Connection [Package] Google Fonts Provider This package no longer exists in the monorepo. [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] My Jetpack [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Status [Package] VideoPress [Package] WAF [Plugin] Beta For serving live branches and the beta versions. https://github.com/automattic/jetpack-beta [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Pri] Normal [Tests] Includes Tests [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants