Skip to content

feat: Add json output flag #6

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adomashst
Copy link

This pull request introduces a new --json option to the PubSubConsume command, allowing the output to be printed in JSON format. The changes include updates to the command's signature, options handling, and a new helper method for retrieving the --json option.

Addition of --json option:

  • Updated the command signature in src/Commands/PubSubConsume.php to include the --json option, which enables JSON-formatted output.
  • Added --json to the list of options returned by the getOptions method, ensuring it is properly recognized and processed.
  • Introduced a new private method getJsonOption to retrieve and cast the value of the --json option as a boolean.

@adomashst adomashst requested a review from a team April 18, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant