Replace boolean value of config variables to literal string when showing to the user#182
Open
imrraaj wants to merge 4 commits intowp-cli:mainfrom
Open
Replace boolean value of config variables to literal string when showing to the user#182imrraaj wants to merge 4 commits intowp-cli:mainfrom
imrraaj wants to merge 4 commits intowp-cli:mainfrom
Conversation
1 task
Author
|
Can I get a review on this PR? @danielbachhuber |
Contributor
|
@imrraaj, can this be tested with the behat feature tests to cover the various types of truthy/falsy values that might be used in wp-config? |
Member
|
@imrraaj I think this can potentially break scripts that already rely on the current behavior. We could put this behind a flag and have the flag default to using this if interactive and not using this if non-interactive. I'll need to check what prior behavior we have that is similar to this so we can stay consistent... |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Member
|
Related: wp-cli/wp-cli#6162 / wp-cli/wp-cli#5542 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes following issue
I refactored the code to return the string representation of a boolean value (i.e., 'true' or 'false'), which is easier to display to the user. Previously, when the variable's value was true, it would render as '1', and blank when false. Using strings allows us to provide clearer guidance to the user regarding which value is true and which is false.