2016-08-07 61 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版本。

看來你需要很多來自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

我最終轉向了奏鳴曲電子商務包 –