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
{{ message }}
Repository navigation
cleverage:process:execute: a JSON output that cannot be encoded makes the command fail and skips the next processes #390
Change of 5.5 (#353): with --output-format json-stream and the standard output, the output is now printed whatever the verbosity (it required -vv). An output that cannot be encoded as JSON (invalid UTF-8, e.g. a Latin-1 file read, NAN / INF) throws a JsonException after the process execution: the command fails and the next processes given to the command are not executed. Before 5.5, without -vv, nothing was printed and the command went on.
Also, --output-format dump without symfony/var-dumper, or an unknown format, now makes the command fail before any execution, while it was ignored for the standard output without -vv. This is wanted (a wrong option detected before the work is done), but not described in UPGRADE.md.
Fix: encode the output with JSON_INVALID_UTF8_SUBSTITUTE; when it still cannot be encoded, report it on the error output and go on. Add both changes to the v5.5 section of UPGRADE.md.
Found during the audit after the 5.5 release (audit-v4-post-release.md#226).
Activity
Merge pull request #391 from cleverage/390