Skip to content

Add skips arg to Utils\report_batch_operation_results().#4429

Merged
danielbachhuber merged 2 commits intomasterfrom
report_batch_skips
Oct 10, 2017
Merged

Add skips arg to Utils\report_batch_operation_results().#4429
danielbachhuber merged 2 commits intomasterfrom
report_batch_skips

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Oct 7, 2017

See wp-cli/media-command#48 (review)

Adds $skips arg to Utils\report_batch_operation_results() to report the number of items skipped. Also adds reporting of the number of items that failed.

The default has been to set to null which suppresses the reporting of failed items, for back compat with current behaviour. If temporarily breaking the tests for the commands that test for this (entity-command, extension-command, media-command and widget-command) is okay, then the default should be zero instead.

@danielbachhuber
Copy link
Member

The default has been to set to null which suppresses the reporting of failed items, for back compat with current behaviour.

I'd actually think this the expected behavior: don't show any message about skips unless a value is explicitly provided.

I've updated the PHPDoc accordingly.

@danielbachhuber danielbachhuber added this to the 1.4.0 milestone Oct 7, 2017
@gitlost
Copy link
Contributor Author

gitlost commented Oct 7, 2017

don't show any message about skips

If null it won't show any message about the number of fails, even if $failures is non-zero. This is the BC behaviour.
If null or zero if won't show any message about skips.

@danielbachhuber
Copy link
Member

@gitlost Ah, I understand now. I think the current implementation looks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants