Skip to content

cleverage:process:execute: a JSON output that cannot be encoded makes the command fail and skips the next processes #390

Closed

Description

@njoubert-cleverage

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

  1. added a commit that references this issue on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions