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

Skip to content

[4.2.7] Fatal on required symfony/validator without symfony/translation #31165

Closed
@andrew-demb

Description

@andrew-demb

Symfony version(s) affected: 4.2.7

Description
Application crashes on trying to import Symfony\Component\Translation\TranslatorInterface for Symfony\Component\Validator\Util\LegacyTranslatorProxy

In LegacyTranslatorProxy.php line 21:
                                                                                                     
  Attempted to load interface "TranslatorInterface" from namespace "Symfony\Component\Translation".  
  Did you forget a "use" statement for "Symfony\Contracts\Translation\TranslatorInterface"?          
                                                                                                     

How to reproduce

composer create-project symfony/skeleton issue-translation-component
cd issue-translation-component/
composer req framework-bundle validator
composer u

bin/console cache:clear

Possible Solution

Additional context

I can avoid the problem, if I require symfony/translator package to app

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