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 --skip-update-check flag to plugin list and theme list commands #300

Merged
merged 19 commits into from Oct 13, 2021

Conversation

Nikschavan
Copy link
Contributor

@Nikschavan Nikschavan commented Oct 8, 2021

By default WP-CLI does a force update check when running 'wp plugin list' and 'wp theme list'
'--skip-update-check' flag can be added to these commands which can bypass the force udpate check

Fixes #299

@Nikschavan
Copy link
Contributor Author

@Nikschavan Nikschavan commented Oct 8, 2021

@schlessera The tests are failing on PHP 5.6 because of null coalescing operator in the one-time-login plugin which is being downloaded in one of the tests.

Is there anything that should be done to fix this? maybe changing the tests to download another dummy repo with a simple plugin. This failing test seems to checking that the branch name is removed from the project downloaded from GitHub (in a separate PR).

Also, I am not sure if I can add any new tests for this new flag introduced int this PR, since the stdout will be same?
I am new to behat testing.

@Nikschavan Nikschavan marked this pull request as ready for review Oct 8, 2021
@Nikschavan Nikschavan requested a review from as a code owner Oct 8, 2021
@swissspidy
Copy link
Member

@swissspidy swissspidy commented Oct 8, 2021

One Time Login apparently requires PHP 7.1 nowadays. So yeah we should download a different one.

@schlessera schlessera changed the title Add '--skip-update-check' flag to plugin and theme list command Add --skip-update-check flag to plugin list and theme list commands Oct 9, 2021
Copy link
Member

@schlessera schlessera left a comment

This also needs a Behat test to ensure the flag works (and keeps working across future updates).

src/WP_CLI/CommandWithUpgrade.php Outdated Show resolved Hide resolved
@Nikschavan
Copy link
Contributor Author

@Nikschavan Nikschavan commented Oct 11, 2021

Converting the PR to draft until i debug the failing tests.

@Nikschavan Nikschavan marked this pull request as ready for review Oct 12, 2021
@Nikschavan
Copy link
Contributor Author

@Nikschavan Nikschavan commented Oct 12, 2021

This is now ready for a review. The failing PHP 5.6 tests should be fixed with #302

@Nikschavan Nikschavan requested a review from schlessera Oct 12, 2021
@schlessera schlessera merged commit d54dec2 into wp-cli:master Oct 13, 2021
24 checks passed
@schlessera
Copy link
Member

@schlessera schlessera commented Oct 13, 2021

Thanks for the PR, @Nikschavan !

@schlessera schlessera added this to the 2.1.3 milestone Oct 13, 2021
@Nikschavan Nikschavan deleted the 299-skip-update-check branch Oct 13, 2021
@Nikschavan
Copy link
Contributor Author

@Nikschavan Nikschavan commented Oct 29, 2021

@schlessera - Is there any (rough) timeline when this can be available in the nightly/stable of wp-cli, I believe until a release is created on an individual command, it is not available in the nightly of wp-cli as well, correct?

I also created wp-cli/wp-cli-bundle#354 to discuss if there is a way to make nightlies include nightly code changes of individual commands as well.

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

Successfully merging this pull request may close these issues.

3 participants