Reputation: 2895
I Upgade Symfony from 3.3 to 4.1 , JMS\TranslationBundle stop working.
Error is
Controller "JMS\TranslationBundle\Controller\TranslateController" has required constructor arguments and does not exist in the container. Did you forget to define such a service?
i try import
imports: - { resource: '@JMSTranslationBundle/Resources/config/services.xml' }
without change
Upvotes: 1
Views: 2617
Reputation: 595
I have the same problem. I wrote comment here:
constructor arguments and does not exist in the container
And this work for me:
add to service.yaml:
JMS\TranslationBundle\Controller\TranslateController:
public: true
arguments:
$configFactory: '@jms_translation.config_factory'
$loader: '@jms_translation.loader_manager'
JMS\TranslationBundle\Controller\ApiController:
public: true
arguments:
$configFactory: '@jms_translation.config_factory'
$updater: '@jms_translation.updater'
and comment or remove this:
#imports:
#- { resource: '@JMSTranslationBundle/Resources/config/services.xml' }
Upvotes: 3