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 support for formatting boolean values in WP_CLI\Formatter #5928

Merged
merged 5 commits into from Apr 26, 2024

Conversation

tfirdaus
Copy link
Contributor

This Pull Request aims to fix issue #5542, where a false value is currently transformed into an empty string.

+----+--------+
| id | status |
+----+--------+
| 1  | 1      |
| 2  |        |
+----+--------+

With these updates, the output for boolean values will be transformed into true and false accordingly.

+----+--------+
| id | status |
+----+--------+
| 1  | true   |
| 2  | false  |
+----+--------+

@tfirdaus tfirdaus requested a review from a team as a code owner April 11, 2024 16:25
Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@swissspidy
Copy link
Member

It's hack day, so let's 🚢 it!

#5935

@swissspidy swissspidy merged commit 46051ea into wp-cli:main Apr 26, 2024
65 checks passed
@danielbachhuber danielbachhuber removed this from the 2.11.0 milestone Apr 26, 2024
@danielbachhuber
Copy link
Member

Thanks for the PR, @tfirdaus !

We decided to revert this for now in #5940 because:

  1. It's technically a breaking change.
  2. I'm concerned it will unexpectedly break folks' scripts that are parsing tabular output.

I filed #5542 against the 3.0 milestone. We can re-open this PR when 3.0 is the next slated release.

@tfirdaus
Copy link
Contributor Author

@danielbachhuber No worries. Thanks for your help.

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.

None yet

4 participants