Symfony2:没有扩展加载Buzz [英] Symfony2 : no extension to load Buzz

查看:82
本文介绍了Symfony2:没有扩展加载Buzz的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在Buzz中为Symfony2使用Curl时遇到问题(我终于设法安装了它,请参阅这篇文章)。

I'm facing an issue while trying to use Curl in Buzz for Symfony2 (I've finally managed to install it, see this post).

我在捆绑包中使用了它,并且我更新了services.yml,添加了这些内容:

I use it it one on my bundles, and I've updated services.yml, adding these :

# cURL client for Buzz
buzz.client.curl:
class:  Buzz\Client\Curl
public: false
calls:
  - [setVerifyPeer, [false]]

# Buzz browser
buzz.browser:
    class:     Buzz\Browser
    arguments: ['@buzz.client.curl']

何时我去检查我的项目页面,这是我得到的错误:

And when I go and check my project's page, here's the error I get :

InvalidArgumentException: There is no extension able to load the configuration for "buzz.client.curl" (in myBundle) Looked for namespace "buzz.client.curl", found none

因此,据我了解,我必须更改Buzz的名称空间声明之一

但是有人知道什么在哪里吗?

So from what I understand, I have to change one of Buzz's namespace declarations somewhere.
But does anybody know what, and where?

推荐答案

好吧,我的错误,我只是没有为我的yml文件使用正确的格式。

Well, my mistake, I simply didn't use the right format for my yml file.

这里是服务的代码,以防万一有人遇到问题。想想这四个空格,可以节省很多时间...

Here is the code of the services, in case anyone has the issue. Think of the 4 spaces, that saves a lot of time...

服务:

buzz.client.curl:
    class:  Buzz\Client\Curl
    public: false
    calls:
        - [setVerifyPeer, [false]]



Buzz浏览器



Buzz browser

buzz.browser:
    class:     Buzz\Browser
    arguments: ['@buzz.client.curl']

这篇关于Symfony2:没有扩展加载Buzz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆