Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ErrorException JMS\SerializerBundle\JMSSerializerBundle

I am trying to install vendors for the following project connect on osx lion.

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

php bin/vendors install

When I run the following command php bin/vendors install I get the following messages:

[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

What did I miss?

like image 233
underscore666 Avatar asked Jan 16 '23 20:01

underscore666


1 Answers

You need to pass the kernel to the bundle's constructor:

$bundles = array(
    //...
    new JMS\SerializerBundle\JMSSerializerBundle($this),
    //...
);
like image 80
Elnur Abdurrakhimov Avatar answered Jan 25 '23 16:01

Elnur Abdurrakhimov