Sylius: [ResourceBundle] entities with phpcr-odm driver [v0.19]

Created on 3 Nov 2016  路  2Comments  路  Source: Sylius/Sylius

How can I use doctrine/phpcr-odm driver on custom entities with sylius resources ?

My configuration is like this:

sylius_resource:
    resources:
        app.article_document:
            driver: doctrine/phpcr-odm
            classes:
                model: AppBundle\Document\ArticleDocument
                factory: AppBundle\Factory\ArticleDocumentFactory
                repository: AppBundle\Repository\StaticContentRepository
                form:
                    default: AppBundle\Form\Type\ArticleDocumentType

But I have this error message:

Resource "app.article_document" uses driver "doctrine/phpcr-odm", but this driver has not been enabled.

Documentation Potential Bug

Most helpful comment

@Raptek Thanks a lot ! I'm gonna try that tomorrow.
@pjedrzejewski I don't found anything about that in sylius documentation, I think I'm gonna do a PR to improve doc.

All 2 comments

You have to enable it in your config.yml

sylius_resource:
    drivers:
        - doctrine/orm
        - doctrine/phpcr-odm

https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/AdminBundle/Resources/config/app/config.yml#L27

@Raptek Thanks a lot ! I'm gonna try that tomorrow.
@pjedrzejewski I don't found anything about that in sylius documentation, I think I'm gonna do a PR to improve doc.

Was this page helpful?
0 / 5 - 0 ratings