Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] ProviderInterface::read is missing a PHPDoc #64155

@MatTheCat

Description

@MatTheCat

Symfony version(s) affected

≥ 5.3

Description

ProviderInterface::read doesn’t give any indication on how providers should react when passed no domains.

The translation:pull command reads pulls translations from the given provider so I’d expect the read method to return every translated message, but

  • CrowdinProvider:read iterates on domains, so it will return an empty translator bag
  • LocoProvider:read will return every translated message, but in a single * domain, which means running translation:pull will create files like *.en.xlf

I didn’t check the other providers but the fact those two have a completely different behavior makes me wonder how they are used.

In any case ProviderInterface::read should document how implementations must behave when passed no domains, and implementations should be updated if required.

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