You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading an application that has the translator disabled from 6.3 to 6.4, I'm getting the following error when running any command:
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 88:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "serializer.normalizer.translatable" has a dependency on a non-existent service "translator".
Exception trace:
at /app/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:88
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:90
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:51
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:99
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:51
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:90
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:51
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() at /app/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:48
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process() at /app/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:42
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->process() at /app/vendor/symfony/dependency-injection/Compiler/Compiler.php:80
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /app/vendor/symfony/dependency-injection/ContainerBuilder.php:767
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /app/vendor/symfony/http-kernel/Kernel.php:506
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /app/vendor/symfony/http-kernel/Kernel.php:763
Symfony\Component\HttpKernel\Kernel->preBoot() at /app/vendor/symfony/http-kernel/Kernel.php:126
Symfony\Component\HttpKernel\Kernel->boot() at /app/vendor/symfony/framework-bundle/Console/Application.php:190
Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /app/vendor/symfony/framework-bundle/Console/Application.php:72
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at /app/bin/console:49
…r is disabled (Jean-Beru)
This PR was merged into the 6.4 branch.
Discussion
----------
[Serializer] Fix TranslatableNormalizer when the Translator is disabled
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#52847
| License | MIT
Fix#52847 by removing the `serializer.normalizer.translatable` when the Translator is disabled. FYI, if the Translator is enabled but the class does not exist, an error is already raised before `Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation". `
Commits
-------
319a0fe [Serializer] Remove TranslatableNormalizer service when the Translator is disabled
Symfony version(s) affected
6.4.0
Description
After upgrading an application that has the translator disabled from 6.3 to 6.4, I'm getting the following error when running any command:
How to reproduce
Possible Solution
Add a check here:
symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Lines 1941 to 1943 in 1a824c1
Additional Context
Switching
enabled
totrue
fixes the issue.The text was updated successfully, but these errors were encountered: