-
Notifications
You must be signed in to change notification settings - Fork 842
Tooling: Run Phan against Woo versions #45986
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
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
b7738ec to
ef7fcd5
Compare
Code Coverage SummaryThis 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. 🤷 |
594a55a to
4e09285
Compare
e31ce66 to
baa5f13
Compare
| - name: Run Phan against WooCommerce 7.0 stubs | ||
| env: | ||
| WOO_VERSION: '7.0' | ||
| run: | | ||
| composer require --dev "php-stubs/woocommerce-stubs:${WOO_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could merge this into the existing Phan run as a three line change: two adding the WOO_VERSION constant with a comment and one adding "php-stubs/woocommerce-stubs:${WOO_VERSION}" to the existing composer update command.
Is there a benefit to doing this as a completely separate run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, four lines: one more to mention old-Woo in the name of the step too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I had it configured to run on 4 Woo versions, so a separate job made sense.
Now it's only running on one Woo version, and it'd be a simple change to move it into the current Phan run, but that already takes 10 minutes. Adding the old Woo run to the existing one would extend that another 5 minutes (wall time), which is a painful amount of time to wait for something to pass or fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the old Woo run to the existing one would extend that another 5 minutes (wall time)
That's not what I suggested. Still two runs, just the second would be "old WP and old Woo" instead of only "old WP" (and this separate one for "old Woo").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misread. Sounds like a plan!
|
I'll close this in favor of a new one after #46026 is merged. |
Closes MONOREP-232
This PR runs Phan against older Woo stubs. I've put the new test in the linting workflow (now that said workflow runs on
trunkas well).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-internalstubs, but that'd be for another PR should we want.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Hopefully there's a new "Static analysis (WooCommerce)" job in the CI that completes successfully.