Skip to content

[6.2] Undefined array key in command translation:extract #48419

Closed
@knallcharge

Description

@knallcharge

Symfony version(s) affected

6.2.0

Description

After updating to Symfony 6.2.0 (from 6.1.8) the command "translation:extract" throws the following error:

php bin/console translation:extract --force de

Translation Messages Extractor and Dumper
=========================================

 // Generating "de" translation files for "default directory"

 // Parsing templates...

11:08:16 ERROR     [main] ErrorException: Warning: Undefined array key 2 (uncaught error) at (...)\vendor\symfony\translation\Extractor\Visitor\AbstractVisitor.php line 56 while running console command `translation:extract` ["error" => ErrorException { …}]
11:08:16 WARNING   [main] Command `translation:extract` exited with status code 1

In AbstractVisitor.php line 56:

  Warning: Undefined array key 2

How to reproduce

run the command
php bin/console translation:extract --force de

or
php bin/console translation:extract --dump-messages de

Possible Solution

No response

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