Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ResourceBundle] Unresolved dependency using mongodb #2201

Closed
rubenrua opened this issue Dec 1, 2014 · 1 comment · Fixed by #2302
Closed

[ResourceBundle] Unresolved dependency using mongodb #2201

rubenrua opened this issue Dec 1, 2014 · 1 comment · Fixed by #2302

Comments

@rubenrua
Copy link

rubenrua commented Dec 1, 2014

Using MongoDB as ODM, the service doctrine doesn't exist. The service sylius.form.type.entity_hidden has a dependency on it:

File: src/Sylius/Bundle/ResourceBundle/Resources/config/services.xml

<service id="sylius.form.type.entity_hidden" class="%sylius.form.type.entity_hidden.class%">
    <argument type="service" id="doctrine" />
    <tag name="form.type" alias="entity_hidden" />
</service>

The dependency should be doctrine_mongodb if MongoDB is used. You can use expression language with Symfony 2.4:

<argument type="expression">container.hasService('doctrine_mongodb') ? service('doctrine_mongodb') : service('doctrine')</argument>
@adamelso
Copy link
Contributor

As a temporary workaround, I added these lines to app/config/config.yml

services:
    doctrine:
        alias: doctrine_mongodb

However if a project requires both Doctrine ORM and Doctrine MongoDB ODM, these can be removed, but I'm wondering if this form type service is used for both Entities and Documents, or just Entities.

rubenrua added a commit to campusdomar/PuMuKIT that referenced this issue Apr 20, 2015
To solve Sylius/Sylius#2201, the doctrine service is created as alias of doctrine_mongodb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants