4

我正在尝试在 osx lion 上为以下项目连接安装供应商。

cd /tmp
git clone git://github.com/dsyph3r/connect
cd connect
git submodule update --init

php bin/vendors install

当我运行以下命令时php bin/vendors install,我收到以下消息:

[ErrorException]

Catchable Fatal Error:
Argument 1 passed to JMS\SerializerBundle\JMSSerializerBundle::__construct()
must implement interface Symfony\Component\HttpKernel\KernelInterface, 
none given, called in /Users/antoniopierro/Sites/connect/app/AppKernel.php on line 21
and defined in /Users/antoniopierro/Sites/connect/vendor/bundles/JMS/SerializerBundle/JMSSerializerBundle.php line 37

我错过了什么?

4

1 回答 1

9

您需要将内核传递给包的构造函数:

$bundles = array(
    //...
    new JMS\SerializerBundle\JMSSerializerBundle($this),
    //...
);
于 2012-04-28T09:31:30.190 回答