我正在使用JMSPaymentCoreBundle和JMSPaymentPaypalBundle。
它以前运行得很好,但现在我不得不将我的config.yml改为新绑定(FOSMessageBundle)。
我必须停止使用“auto_mapping”,而改用“entity_managers”
doctrine:
dbal:
orm:
auto_generate_proxy_classes: %kernel.debug%
# auto_mapping: true
entity_managers:
FOSUserBundle: ~
FOSMessageBundle: ~然而,在这之后。
The service "payment.plugin_controller" has a dependency on a non-existent service "doctrine.orm.default_entity_manager"这个错误就会发生。
我认为config.yml中的更改会导致这种麻烦。
我该如何解决这个问题?
发布于 2013-09-15 23:48:25
根据错误,您需要定义一个名为default的实体管理器。在您的例子中,总体语法是错误的,请参阅我的示例。
在config.yml中:
doctrine:
orm:
entity_managers:
default: # that's the name of the entity manager
connection: default # you need to define the default connection
mappings:
FOSUserBundle: ~
FOSMessageBundle: ~我建议你读一下关于“数据库和原则”和“如何使用多个实体管理器和连接”的文档
https://stackoverflow.com/questions/18816973
复制相似问题