2016-08-07 2 views
0

Я работаю на приложение Symfony 2 и в процессе интеграции сверток продукта Sylius я получаю следующее сообщение об ошибке при запускеКласс sylius.model.product_archetype.class не существует.

php app/console doctrine:schema:update --force 

Ошибка

The class sylius.model.product_archetype.class does not exist. 

Конфигурация Это мой файл confi.yml

sylius_cart: 
    resolver: app.cart_item_resolver # The id of our newly created service. 
    classes: ~ # This key can be empty but it must be present in the configuration. 

sylius_order: 
    driver: doctrine/orm # Configure the doctrine orm driver used in documentation. 

sylius_money: ~ 

sylius_product: 
    driver: doctrine/orm 

stof_doctrine_extensions: 
    orm: 
     default: 
      sluggable: true 
      timestampable: true 

#sylius_archetype: 
sylius_archetype: 
    driver: doctrine/orm # Configure the doctrine orm driver used in the documentation. 

sylius_translation: 
    default_locale: en 

И комплекты Я включаю в новом FOS \ RestBundle \ FOSRestBundle(),

new JMS\SerializerBundle\JMSSerializerBundle($this), 
    new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), 
    new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), 
    new Sylius\Bundle\ProductBundle\SyliusProductBundle(), 
    new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(), 
    new Sylius\Bundle\AttributeBundle\SyliusAttributeBundle(), 
    new Sylius\Bundle\VariationBundle\SyliusVariationBundle(), 
    new Sylius\Bundle\TranslationBundle\SyliusTranslationBundle(), 
    new Sylius\Bundle\CartBundle\SyliusCartBundle(), 
    new Sylius\Bundle\OrderBundle\SyliusOrderBundle(), 
    new Sylius\Bundle\MoneyBundle\SyliusMoneyBundle(), 
    new Sylius\Bundle\ArchetypeBundle\SyliusArchetypeBundle(), 

Любой идею, что я делаю неправильно здесь. Похоже, что документы больше не соответствуют коду.

ответ

0

Основная команда прилагает все усилия, чтобы очистить документацию (see here), имея в виду 1.0 beta release.

Кажется, вам нужно много компонентов от Sylius. Как насчет того, чтобы начать со стандартного издания и создать собственный пакет, чтобы изменить все, что вы хотите? Руководство по настройке свежее обновление (here).

+0

да документация на самом деле беспорядок. Мне было бы здорово, если бы он мог указать версию, для которой он предназначен. У меня уже построено приложение, и я вернусь к большой задержке. Спасибо в любом случае –

0

Основная ссылка конфигурации для архетипа продукта заключается в следующем:

sylius_archetype: 
resources: 
    product: 
     archetype: 
      classes: 
       model: Sylius\Component\Core\Model\Archetype 
       interface: Sylius\Component\Product\Model\ArchetypeInterface 
      translation: 
       classes: 
        model: Sylius\Component\Product\Model\ArchetypeTranslation 
        interface: Sylius\Component\Product\Model\ArchetypeTranslationInterface 
     subject: Sylius\Component\Core\Model\Product 
     attribute: Sylius\Component\Product\Model\Attribute 
     option: Sylius\Component\Product\Model\Option 

Вы должны изменить, я думаю

Sylius\Component\Core\Model\Archetype 

по

Sylius\Component\Product\Model\Archetype 

И

Sylius\Component\Core\Model\Product 

по

Sylius\Component\Product\Model\Product 

Надеется, что это помогает :)

+0

Я закончил тем, что перешел на сонатную электронную коммерцию –