symfony: Update to 4.2.7 - Fatal error: Interface 'TranslatorInterface' not found
Symfony version(s) affected: 4.2.7
Description
After my composer update from 4.2.6 to 4.2.7 I get the following fatal error.
Fatal error: Interface 'Symfony\Component\Translation\TranslatorInterface' not found
in testarea_symfony_api\vendor\symfony\validator\Util\LegacyTranslatorProxy.php
on line 21
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
Upgrade from 4.2.6 to 4.2.7 via composer update.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 29
- Comments: 23 (7 by maintainers)
Commits related to this issue
- bug #31156 [FrameworkBundle] call method with Translator component only (xabbuh) This PR was merged into the 4.2 branch. Discussion ---------- [FrameworkBundle] call method with Translator componen... — committed to symfony/symfony by nicolas-grekas 5 years ago
- Fix translator issue Workaround for https://github.com/symfony/symfony/issues/31152 — committed to TomaszGasior/RadioLista-v3 by TomaszGasior 5 years ago
- bug #10324 Add a workaround for GridBundle & Symfony 4.2.7 to make tests passing (pamil) This PR was merged into the 1.3 branch. Discussion ---------- See https://github.com/symfony/symfony/issues/... — committed to Sylius/Sylius by GSadee 5 years ago
Mailbox spammed by thousands of “same error” mails won’t help them to fix it up. 😉
composer req symfony/translation
same error
https://github.com/symfony/symfony/pull/31108#issuecomment-484184993
Thanks @Gemorroj for providing this workaround. I’ll have a look tomorrow, unless someone submits a PR meanwhile.
@Spomky @stof Or use the
cweagans/composer-patches
package to patch it for you before they release it.Then in composer.json:
So the idea to solve that issue is to require something we don’t need… Prefer not to do that and wait for a better solution.
Something like this can help: https://github.com/TomaszGasior/RadioLista-v3/commit/1c8170df7f027e29ba7d9c5f9145e93a31aca590
Until new release of framework-bundle you need to fork framework-bundle repository and create your own branch for commit with bugfix.
Or you can just install translator component. 😉
Same error here
@featuriz You can do that for the moment as a workaround until the fix from #31156 is released with Symfony 4.2.8.
the other solution is to install the dev version of FrameworkBundle, which already contains the patch, which will be part of the 4.2.8 release.
Same error. For the moment we go back to version 4.2.6.
same error