Please register the bundle before DoctrineBundle. This is important as we use listeners which have to be processed first.
Sylius Product Bundle as dependency
-
12-10-2022 - |
문제
I have an existing Symfony2 project which I'm attempting to install and use certain bundles from the Sylius project as dependencies. Here is my problem, I've added the SyliusProductBundle and all of its dependencies; however, when I attempt to update my database schema with:
app/console doctrine:scheme:update --force
I get the following error:
[Doctrine\Common\Persistence\Mapping\MappingException]
Class 'Sylius\Bundle\ProductBundle\Model\ProductInterface' does not exist
I'm not sure why this is happening, although it seems to be some sort of namespacing issue?
I have the following configuration:
sylius_resource:
resources:
src.user:
driver: doctrine/orm
templates: App:User
classes:
model: SRC\Bundle\UserBundle\Entity\User
sylius_product:
driver: doctrine/orm
classes:
product:
model: Sylius\Bundle\CoreBundle\Model\Product
controller: Sylius\Bundle\CoreBundle\Controller\ProductController
repository: Sylius\Bundle\CoreBundle\Repository\ProductRepository
form: Sylius\Bundle\CoreBundle\Form\Type\ProductType
해결책
제휴하지 않습니다 StackOverflow