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

FrameworkBundle v4.2.7 assumes "translator" service implements the contract's translator interface #31161

Copy link
Copy link
Closed
@pamil

Description

@pamil
Issue body actions

Symfony version(s) affected: 4.2.7

Description
SyliusThemeBundle overrides default translator service with the one that implements Symfony\Component\Translation\TranslatorInterface but not Symfony\Contracts\Translation\TranslatorInterface. This causes Symfony\Component\Validator\Util\LegacyTranslatorProxy to fail because it expects translator service to implement the contract's translator interface. It is a BC break AFAIK.

https://travis-ci.org/Sylius/Sylius/jobs/521619940#L834

How to reproduce
Override translator service not to implement Symfony\Contracts\Translation\TranslatorInterface but Symfony\Component\Translation\TranslatorInterface instead.

Possible Solution

  • make Symfony\Component\Translation\TranslatorInterface extend Symfony\Contracts\Translation\TranslatorInterface
  • allow Symfony\Component\Translation\TranslatorInterface instance to be passed to Symfony\Component\Validator\Util\LegacyTranslatorProxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.