Reputation: 1384
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.
Upvotes: 2
Views: 7919
Reputation: 1384
The manual says it to register the bundle with the kernel:
new JMS\Serializer\JMSSerializerBundle($this),
but the installer create the folder: vendor/bundles/JMS/SerializerBundle
so, it must be added the next line to the AppKernel.php instead of the other:
new JMS\SerializerBundle\JMSSerializerBundle($this),
Upvotes: 4
Reputation: 41934
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
.
Upvotes: 4
Reputation: 47
Did you also do the following steps from the manual? Sounds to me like you didn't add the line
new JMS\Serializer\JMSSerializerBundle($this)
to AppKernel.php
Upvotes: 2