0

I am trying to configure KnpGaufretteBundle with the help of KnpLabs
But at the point of configuring Filesystems in config.yaml I got this error

ContextErrorException: Notice: Undefined variable: adapters in 
C:\xampp\htdocs\symfony2\src\Knp\Bundle\GaufretteBundle\
DependencyInjection\KnpGaufretteExtension.php
line 50

I have tried a lot to solved it.
Can any know how to remove this error or how to configure KnpGaufretteBundle Bundle in symfony 2.3.5 ?
Any help would be appreciated.

4

3 回答 3

0

您很可能忘记将适配器添加到捆绑配置中。这就是为什么当扩展程序尝试在此处设置文件系统时会出现异常($adapters 未定义)。

请按照文档配置适配器

于 2013-10-01T11:59:39.743 回答
0

谢谢大家,我进行了以下更改并开始工作...

knp_gaufrette:适配器:foo:本地:目录:/path/to/my/filesystem 创建:true

应用程序/配置/config.yml

knp_gaufrette:适配器:foo:safe_local:目录:/path/to/my/filesystem 创建:true

于 2013-10-05T05:37:36.147 回答
0

感谢您的回复,在我的 config.yml 我写下面的代码 knp_gaufrette: adapters: foo: local: directory: /path/to/my/filesystem

应用程序/配置/config.yml

knp_gaufrette: 适配器: # ... 文件系统: bar: 适配器: foo 别名: foo_filesystem

于 2013-10-05T05:29:34.753 回答