Sylius产品捆绑配置 [英] Sylius Product Bundle configuration
问题描述
我正在将Sylius产品包集成到我现有的Symfony项目中。它已经配置了原则。
这是我得到的错误:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
路径sylius_attribute中的子节点驱动程序必须配置。
任何想法是什么原因造成的?我按照蝙蝠的指示,不做其他任何安装sylius。
http://docs.sylius.org/en/latest/bundles/SyliusProductBundle/installation.html
我不得不更改我的composer.json文件中的doctrine-bundle版本,以允许
< blockquote>
作曲家需要sylius / product-bundle
成功运行,无错误。我将版本从1.2。*更改为
doctrine / doctrine-bundle:1.3。*
此外,在安装这些人之后,我将以下内容添加到我的config.yml文件中
sylius_product:
driver:doctrine / orm
classes:
product:
model:Sylius\Bundle\CoreBundle\Model\Product
控制器:Sylius\Bundle\CoreBundle\Controller\ProductController
存储库:Sylius\Bundle\CoreBundle\Repository\ProductRepository
stof_doctrine_extensions:
default_locale:es_us
translation_fallback:true
orm:
默认值:
树:true
最初我收到以下错误:
[例外]
缺少参数sylius.translation.default.mapping。必须定义默认的转换映射!
稍后搜索一下,我将下面的内容添加到config.yml文件中
sylius_translation:
default_mapping:
可翻译:
字段:翻译
currentLocale:currentLocale
fallbackLocale:fallbackLocale
翻译:
字段:可翻译
语言环境:语言环境
doctrine:
dbal:
$%$%$%$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
password:%database_password%
charset:UTF8
orm:
auto_generate_proxy_classes:%kernel.debug%
auto_mapping:true
我没有在这些设置中更改任何内容。
我在这里做错了什么或丢失了?没有任何帮助将不胜感激。
谢谢!
编辑
我尝试添加以下所有项目:
sylius_attribute:
驱动程序:doctrine / orm
sylius_variation:
驱动程序:doctrine / orm
sylius_archetype:
driver:doctrine / orm
现在我收到以下错误:
[InvalidArgumentException]
类sylius.model.product_archetype.class不存在。
我仍然没有运气将相应的文件添加到AppKernel!
新Sylius\Bundle\AttributeBundle\SyliusArchetypeBundle(),
,然后将其更改为:
新的Sylius\Bundle\ArchetypeBundle\SyliusArchetypeBundle (),
设置Sylius迄今一直很紧张:(
在您遵循的教程中没有提及,但我认为这将有助于您:
I'm trying to integrate Sylius Product Bundle into my existing Symfony project. It already has doctrine configured.
This is the error I am getting:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
The child node "driver" at path "sylius_attribute" must be configured.
Any idea what's causing this? I followed the instruction right off the bat without doing any other installations of sylius.
http://docs.sylius.org/en/latest/bundles/SyliusProductBundle/installation.html
I had to change the doctrine-bundle version in my composer.json file to allow the
composer require "sylius/product-bundle"
to run successfully without errors. I changed the version from 1.2.* to
"doctrine/doctrine-bundle": "1.3.*"
Also after composer installed these guys, i added the following to my config.yml file
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
stof_doctrine_extensions:
default_locale: es_us
translation_fallback: true
orm:
default:
tree: true
Initially I was getting the following error:
[Exception]
Missing parameter sylius.translation.default.mapping. Default translation mapping must be defined!
After a little searching around I added the piece below to the config.yml file
sylius_translation:
default_mapping:
translatable:
field: translations
currentLocale: currentLocale
fallbackLocale: fallbackLocale
translation:
field: translatable
locale: locale
Already existing earlier in my config.yml file was:
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
I didn't change anything in these settings.
What am i doing wrong here or missing? ANy help will be greatly appreciated.
Thanks!
EDIT
I tried adding all the below items:
sylius_attribute:
driver: doctrine/orm
sylius_variation:
driver: doctrine/orm
sylius_archetype:
driver: doctrine/orm
Now I get the following error:
[InvalidArgumentException]
The class sylius.model.product_archetype.class does not exist.
I added the corresponding file to the AppKernel with still no luck!
new Sylius\Bundle\AttributeBundle\SyliusArchetypeBundle(),
and then changed it to:
new Sylius\Bundle\ArchetypeBundle\SyliusArchetypeBundle(),
Setting up Sylius has been quiet stressful so far :(
It wasn't mention on the tutorial you followed but I think it will help you :
这篇关于Sylius产品捆绑配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!