3
votes

I'm getting an error when i work with FOSRestBundle.

Fatal error: Class 'JMS\Serializer\SerializationContext' not found in /home/a15net/public_html/kavuklar/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php on line 209

It was working before composer.phar update.

Do you any have idea about this why i'm getting this error?

1
@mkjasinski i did not touch anything. So i'm not sure that.Canser Yanbakan
JMSSerializerBundle is registered in AppKernel.php?mkjasinski
@mkjasinski yes new JMS\SerializerBundle\JMSSerializerBundle($this), but i'v searched for this file and find nothing. I think the file is updated as just Serializer.phpCanser Yanbakan
cache cleared after composer.phar update?mkjasinski
yes i did it myself to be sure.Canser Yanbakan

1 Answers

10
votes

I had the same problem.

I solved it reading the FOSRestBundle upgrade file, and then updating my composer.json. You should try to put in require section this next lines:

"friendsofsymfony/rest-bundle": "0.11.*",
"jms/serializer-bundle": "0.12.x-dev"

and then

composer.phar update

It works for me.

Try and comment.