Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TranslationUpdateCommand call undefined TranslationWriterInterface::getFormat() #43466

Copy link
Copy link
Closed
@noemi-salaun

Description

@noemi-salaun
Issue body actions

Symfony version(s) affected: 5.3, 4.4, 3.4

Description
TranslationWriterInterface does not define a getFormat() method but TranslationUpdateCommand call $writer->getFormat() even when it only depends on TranslationWriterInterface and not the TranslationWriter implementation that actually define getFormat().

How to reproduce

  • Replace the $writer service injected in TranslationUpdateCommand with a custom writer that implements TranslationWriterInterface without having a getFormat() method (which is not part of the interface)
  • Call the command and see the error Attempted to call an undefined method named "getFormats" of class "App\MyCustomTranslationWriter"

Possible Solution
Add the getFormat() method to the TranslationWriterInterface

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.