Skip to content

Conversation

@tbradsha
Copy link
Contributor

@tbradsha tbradsha commented Nov 20, 2025

Closes MONOREP-245

This PR runs Phan against WooCommerce 7.0 stubs. Supersedes #45986.

Proposed changes:

We've had a few cases where Jetpack releases have unleashed some fatals because an assumption that users ran fairly recent WooCommerce versions:

  • p1759248959778399/1759158780.923629-slack-CK365S85V
  • p1763478353571209/1763474992.105219-slack-CK365S85V
  • p1759758846239149/1759158780.923629-slack-CK365S85V

If there's a need we could consider generating new woocommerce-internal stubs, but that'd be for another PR should we want.

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:

Is CI happy?

@tbradsha tbradsha requested a review from a team November 20, 2025 21:54
@tbradsha tbradsha self-assigned this Nov 20, 2025
@tbradsha tbradsha added [Status] Needs Review This PR is ready for review. [Type] Janitorial labels Nov 20, 2025
@github-actions github-actions bot added the Actions GitHub actions used to automate some of the work around releases and repository management label Nov 20, 2025
@github-actions
Copy link
Contributor

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 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 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

WOO_VERSION: 7
run: |
composer update --prefer-lowest php-stubs/wordpress-stubs php-stubs/wordpress-tests-stubs
# We can't directly downgrade Woo stubs with `update` due to existing constraints
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we if we change the constraint in composer.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean in trunk like we do with WP stubs? We could; I personally lean toward keeping constraints tighter in there, but right now it's >=8.7, so if that's your preference I can do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's give it a go: e53acbb

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.

@tbradsha tbradsha merged commit f5a8565 into trunk Nov 21, 2025
65 checks passed
@tbradsha tbradsha deleted the update/tooling/run_phan_against_old_woo branch November 21, 2025 17:33
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions GitHub actions used to automate some of the work around releases and repository management [Type] Janitorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants