-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add --force-check
flag to wp plugin list
and wp theme list
.
#426
base: main
Are you sure you want to change the base?
Add --force-check
flag to wp plugin list
and wp theme list
.
#426
Conversation
…-update-check`. Signed-off-by: Saul Baizman <saul@baizmandesign.com>
Signed-off-by: Saul Baizman <saul@baizmandesign.com>
Signed-off-by: Saul Baizman <saul@baizmandesign.com>
@baizmandesign Please make sure all tests except PHP 8.4 are passing in Actions. |
Signed-off-by: Saul Baizman <saul@baizmandesign.com>
Hi, @ernilambar. I added another commit, and it failed three tests: 2 related to PHP 8.4 and one test due to a GitHub API rate limit issue. Is there a way to re-run the one failed test unrelated to PHP 8.4? |
PHP 8.4 tests are expected to fail, PHP 8.4 is still in alpha and WP-CLI is not yet compatible. Feel free to ignore those. |
Thanks for the info, @swissspidy. Is there a way to re-run the one test unrelated to PHP 8.4 that failed? |
5043fba
to
9c85840
Compare
Hi, @ernilambar. I've made the changes you requested. Please let me know if there's anything else I need to do. Thanks! |
Looks good to me; tests run locally. I like the |
Hi, guys. Any update on the status of this pull request? Thanks! |
I notice that we use |
It's a good question. For commands like But for |
I do see
In terms of premium plugins, this does now suggest that when the |
Tempting to just remove the flag and make this the default behavior if we're also having the discussion of a 3.0 release that can include 'breaking' changes wp-cli/wp-cli#6026 I know personally I always want this command to do a live check if I'm running it directly from the command line and have been bitten in the past looking for a security update that doesn't show because it wasn't there the last time wp itself checked |
Having both force-check and skip-update-check is certainly confusing 🤔 |
I agree it feels weird to have both a I understand why WordPress core shouldn't do an api call for every visit to the plugins page, but I'm not sure wp cli needs that same restriction (and I think most people using wp cli would prefer the --force behavior). If we don't want to make a force check the default behavior I think we just need to accept this new flag as awkward but merge this PR. Personally I've gotten used to the more awkward |
@mrsdizzie I'm the author of this PR, and I would love the default behavior of WP CLI to be to always check for the latest versions of plugins and themes and that this Adding this functionality as the default behavior would not be a breaking change (I don't think), and I suspect it would prevent a small amount of confusion for a subset of WP CLI users. |
WP-CLI has typically avoided changing default behavior when it comes to cases like this with transients/cache. So in many cases the user needs to manually do that. (see also this related discussion) So to me it makes sense to change the default behavior to force (i.e. delete the transient) unless |
Could probably just put a extension-command/src/WP_CLI/CommandWithUpgrade.php Lines 544 to 547 in 33afe4f
Interesting that comment suggests to me that this should already be happening |
Yeah that's where I would put it 👍 |
Hi @danielbachhuber,
In the process of updating my fork, I somehow accidentally closed the existing pull request for this feature.
Here's the code and tests. Please let me know if you have any feedback!
Saul