Install JMSSerializerBundle

Sadiel picture Sadiel · Dec 17, 2012 · Viewed 7.4k times · Source

I installed FOSRestBundle but it needs JMSSerializerBundle.

I added in my deps the next lines:

[JMSSerializerBundle]
    git=git://github.com/schmittjoh/JMSSerializerBundle.git
    target=bundles/JMS/SerializerBundle

Here it explains how to do it: http://jmsyst.com/bundles/JMSSerializerBundle/master/installation

but when I try $php bin/vendors install it shows me an error:

[InvalidArgumentException]                                          
  The service definition "jms_serializer.serializer" does not exist.  

Answer

Wouter J picture Wouter J · Dec 17, 2012

You should comment the new FOS\RestBundle\FOSRestBundle(), line in AppKernel.php in the registerBundles() method. Then install the JmsSerializerBundle and after that you should decommend that line and register the JsmSerializerBundle.