Skip to content

Conversation

tfirdaus
Copy link
Contributor

@tfirdaus tfirdaus commented Apr 6, 2024

This pull request aims to address the issue reported in #5391 where adding an alias without the @ symbol would result in the alias being added but missing from the output of the wp cli alias list command because it does not have the @ symbol. With the updates in this pull request, if the user forgets to provide the @ symbol as the prefix, it will be added behind the scenes to ensure the alias can be listed correctly.

@tfirdaus
Copy link
Contributor Author

tfirdaus commented Apr 8, 2024

Hey @swissspidy, about the PHPCS issue...

Mixing different binary boolean operators within an expression without using parentheses to clarify precedence is not allowed.PHPCS(Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence.MissingParentheses)

It looks like the issue has been around for a while as the file affected has been untouched in this PR. Should we fix it in this PR, or should I create a separate issue or PR for it?

@swissspidy
Copy link
Member

Yeah it probably only got surfaced now because of an unrelated PHPCS update and there not being any other code changes recently.

Given the great state of this PR (thanks a lot for your work on this!) I'd say let's fix it as part of this PR.

Should be as trivial as adding some parentheses :)

@swissspidy swissspidy added this to the 2.11.0 milestone Apr 8, 2024
Comment on lines 651 to 653
"""
Success: Added '@hello' alias.
"""
Copy link
Member

Choose a reason for hiding this comment

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

The indentation looks a bit off here

Copy link
Contributor Author

@tfirdaus tfirdaus Apr 8, 2024

Choose a reason for hiding this comment

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

@swissspidy Good catch :) I've pushed an update to fix it.
Does the indentation look correct?
Let me know if there's anything else I might've missed.

@swissspidy swissspidy merged commit a48b2ec into wp-cli:main Apr 8, 2024
@tfirdaus tfirdaus deleted the fix/alias-prefix branch April 9, 2024 03:12
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.

Incorrect success message when adding an alias without an @ symbol
2 participants