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

Add --force-check flag to wp plugin list and wp theme list. #426

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

baizmandesign
Copy link

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

@baizmandesign baizmandesign requested a review from a team as a code owner May 7, 2024 05:25
@ernilambar
Copy link
Member

@baizmandesign Please make sure all tests except PHP 8.4 are passing in Actions.

@baizmandesign
Copy link
Author

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?

@swissspidy
Copy link
Member

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.

@baizmandesign
Copy link
Author

Thanks for the info, @swissspidy. Is there a way to re-run the one test unrelated to PHP 8.4 that failed?

@baizmandesign baizmandesign force-pushed the feature/plugin-theme-force-check-183 branch from 5043fba to 9c85840 Compare May 14, 2024 14:44
@baizmandesign
Copy link
Author

Hi, @ernilambar. I've made the changes you requested. Please let me know if there's anything else I need to do. Thanks!

@BrianHenryIE
Copy link
Member

Looks good to me; tests run locally.

I like the When I run wp eval-file update-transient.php trick.

@baizmandesign
Copy link
Author

Hi, guys. Any update on the status of this pull request? Thanks!

@swissspidy swissspidy requested a review from a team June 3, 2024 16:57
@mrsdizzie
Copy link
Contributor

I notice that we use --force in most other commands for similar behavior. Would it be better to name this --force and not --force-check to match existing commands?

@swissspidy
Copy link
Member

It's a good question. For commands like install or update, the intention of --force seems clear.

But for wp plugin/theme list, only --force seems too ambiguous to me.

@BrianHenryIE
Copy link
Member

--force makes sense in terms of something being written which is already known. It's more of a push word, whereas the point of this PR is to pull/fetch the latest information. I found myself using --refresh in a premium plugin licence update command I was writing.

I do see --skip-check elsewhere, so --force-check makes sense as its opposite. Also worth considering that --flag automatically comes with --no-flag (utils.php) (Configurator.php).

--force-check is probably fine here.

In terms of premium plugins, this does now suggest that when the update_plugins transient value does not have the premium plugin's update status, it should fetch it from its remote server and not to use cached information (which is fine, just not so explicit before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants