10000 `TranslationDebugCommand` with `--only-missing` should not return non-zero exit code · Issue #44907 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
TranslationDebugCommand with --only-missing should not return non-zero exit code #44907
Closed
@mhujer

Description

@mhujer

Symfony version(s) affected

5.3.13

Description

TranslationDebugCommand should return exit code 0 when used with --only-missing and there are no missing translations.

I wanted to add check for missing translations to our CI build but it turned out that even if you run debug:translation with --only-missing flag to only display missing translations, it still returns exit code 66 (EXIT_CODE_UNUSED constant) which fails the build.

It is because there are some translations in the application which are not detected by Symfony (That's OK. That's why I want to only check if some of the actually detected translations are missing).

How to reproduce

Run php bin/console debug:translation cs --only-missing src/App/ in an application which has some unused translations in translation files.

Expected result: exit code 0, because there are no missing translations.
Actual result: exit code 66, because there are some unused translations (which I don't care about - that's why I passed --only-missing)

Possible Solution

Change the behaviour of TranslationDebugCommand that it returns non-zero exit code for --only-missing flag, when there are actual missing translations. (And similarly for --only-unused flag).

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0