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

Update package/jetpack-mu-wpcom to php 8.1 #41928

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from
Open

Update package/jetpack-mu-wpcom to php 8.1 #41928

wants to merge 10 commits into from

Conversation

jeryj
Copy link
Contributor

@jeryj jeryj commented Feb 20, 2025

Proposed changes:

Require php 8.1 or higher on package/jetpack-mu-wpcom.

since WordPress.com (both Simple and Atomic) uses [php version] 8.1, there's no point in restricting the code that's only intended for use there to passing linting and PHPCompatibility checks for earlier versions.
Explained by @anomiex

This change was originally made in #41770, but I think it should be its own PR since it doesn't really have to do with moving the theme api files.

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?

Testing instructions:

  • Go to '..'

Copy link
Contributor

github-actions bot commented Feb 20, 2025

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 WoA dev 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, select your plugin (WordPress.com Site Helper), and enable the update/php-8.1 branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/php-8.1

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

@jeryj
Copy link
Contributor Author

jeryj commented Feb 20, 2025

I'm not sure why these changes were necessary: @anomiex, @zinigor, @tbradsha. Do you have context that could get added to this PR? Feel free to close this if you think it should stay within #41770.

@github-actions github-actions bot added [Package] Jetpack mu wpcom WordPress.com Features [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh labels Feb 20, 2025
Copy link
Contributor

github-actions bot commented Feb 20, 2025

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.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!


Mu Wpcom plugin:

  • Next scheduled release: WordPress.com Simple releases happen semi-continuously (PCYsg-Jjm-p2).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Feb 20, 2025
Copy link

jp-launch-control bot commented Feb 20, 2025

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report

@anomiex
Copy link
Contributor

anomiex commented Feb 20, 2025

This change was made in #41770, but I think it should be its own PR since it doesn't really have to do with moving the theme api files.

Good thinking, I agree!

I'm not sure why these changes were necessary: @anomiex [...]. Do you have context that could get added to this PR?

The default assumption in the monorepo is that projects will match WordPress Core's PHP version requirement, which is currently 7.2 or later. But since WordPress.com (both Simple and Atomic) uses 8.1, there's no point in restricting the code that's only intended for use there to passing linting and PHPCompatibility checks for earlier versions.

@anomiex
Copy link
Contributor

anomiex commented Feb 20, 2025

BTW, for this to work you'll also need to include a9df08d. Feel free to make that another separate PR preceeding this one if you'd like.

Significance: patch
Type: changed

Janitorial change: added PHPCS setting file.
Copy link
Contributor

@anomiex anomiex Feb 20, 2025

Choose a reason for hiding this comment

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

I might change this to something like "Update minimum PHP version to 8.1." Same for the other change entries below. It doesn't matter a whole lot for these though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@tbradsha
Copy link
Contributor

I think it should be its own PR

Totally fair. My thought was that it'd quickly unblock the PR to allow it to be merged rather than needing a rebase/merge from trunk, but clearly that was short-sighted.

@jeryj jeryj changed the base branch from trunk to update/remove-jetpack-mu-wpcom-masterbar-dep February 20, 2025 20:15
@jeryj
Copy link
Contributor Author

jeryj commented Feb 20, 2025

BTW, for this to work you'll also need to include a9df08d. Feel free to make that another separate PR preceeding this one if you'd like.

@anomiex I was looking at that one too, but was unsure how it was related. I opened a PR with just that commit: #41931. That PR is now the base branch for this PR. Is that what you meant?

Base automatically changed from update/remove-jetpack-mu-wpcom-masterbar-dep to trunk February 20, 2025 21:30
@jeryj
Copy link
Contributor Author

jeryj commented Feb 20, 2025

Rebased with trunk since #41931 was merged.

@anomiex
Copy link
Contributor

anomiex commented Feb 20, 2025

Some lock files need updating. Otherwise LGTM.

The "WordPress.com Tests" failing looks like the usual flakiness from that lately. Probably it'll pass on the re-run after you update the lock files.

@jeryj
Copy link
Contributor Author

jeryj commented Feb 20, 2025

Updated the lock files using this message from the errors:

  • tools/composer-update-monorepo.sh --root-reqs "projects/plugins/wpcomsh"
  • tools/composer-update-monorepo.sh --root-reqs "projects/plugins/mu-wpcom-plugin"

@jeryj jeryj added [Status] Needs Team Review Your teammate needs to review this PR. [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] Needs Team Review Your teammate needs to review this PR. labels Feb 21, 2025
@github-actions github-actions bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. labels Feb 21, 2025
@jeryj jeryj added [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Feb 21, 2025
@github-actions github-actions bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. labels Feb 21, 2025
@jeryj jeryj self-assigned this Feb 21, 2025
@jeryj
Copy link
Contributor Author

jeryj commented Feb 21, 2025

I've replied and addressed everything, but the github actions keep auto-adding needs author reply. I just self-assigned myself to see if it would consider me an author so it'll stop automatically changing tags on me.

@jeryj jeryj added [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Feb 21, 2025
@github-actions github-actions bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. labels Feb 21, 2025
@jeryj jeryj added [Type] Janitorial [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Feb 21, 2025
@anomiex anomiex added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Jetpack mu wpcom WordPress.com Features [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh [Status] Ready to Merge Go ahead, you can push that green button! [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants