You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there,
looking at the CLImate docs linked in README.md, one would expect that $cli->json($myJson) (eg inside a custom command) outputs JSON into the terminal - but all it does is return json_encoded data, which then needs to be output to the terminal, like this: $cli->out($cli->json($myJson)) - which is not desired behaviour from the looks of it.
In order to comply with aforementioned docs, PR #33 attempts to solve this.
Cheers,
S1SYPHOS
The text was updated successfully, but these errors were encountered:
Sorry for the massive delay. I think you are right that this should work in the same way as the climate method. I've added it as a general helper to create json from arrays without automatically dumping it. If we change it like in your PR it would be a breaking change.
I looked at it again and it's really one of those wrong decisions that are difficult to undo. I think we need to have a 2.0.0 for this. So far you can still use $cli->climate()->json() to get the behaviour you are looking for.
Hey there,
looking at the
CLImate
docs linked inREADME.md
, one would expect that$cli->json($myJson)
(eg inside a custom command) outputs JSON into the terminal - but all it does is returnjson_encode
d data, which then needs to beout
put to the terminal, like this:$cli->out($cli->json($myJson))
- which is not desired behaviour from the looks of it.In order to comply with aforementioned docs, PR #33 attempts to solve this.
Cheers,
S1SYPHOS
The text was updated successfully, but these errors were encountered: