我正在使用JMSPaymentCoreBundle和JMSPaymentPaypalBundle. 它之前运作良好,但现在我必须更改我的config.yml for new Bundle(FOSMessageBundle) 我必须停止使用’auto_mapping’并使用’entity_managers’代替 doctri
它之前运作良好,但现在我必须更改我的config.yml for new Bundle(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中的更改会导致这种麻烦.
我怎么解决这个问题?
根据错误,您需要定义名为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: ~
我建议你阅读有关“Databases and Doctrine”和“How to work with Multiple Entity Managers and Connections”的文件
