Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The annotation "@JMS\SerializerBundle\Annotation\ExclusionPolicy" does not exist #282

Closed
FlyersWeb opened this issue Mar 20, 2013 · 4 comments

Comments

@FlyersWeb
Copy link

Hi,

When using Symfony2 composer.phar. After installing the JMSSerilizerBundle, i wanted to use the Exclude annotation but it didn't work, see error message in title.

I've installed JMS like this :

php .\composer.phar require jms/serializer

Added this to AppKernel.php :

new JMS\SerializerBundle\JMSSerializerBundle(),

But when I want to use annotations in my entity Activity.php :

use JMS\SerializerBundle\Annotation\ExclusionPolicy;
use JMS\SerializerBundle\Annotation\Exclude;

/**
 * Activity
 *
 * @ORM\Table(name="Activity")
 * @ORM\Entity
 * @ExclusionPolicy("none")
 */
class Activity
{
...
}

I got the previous error in title.

@FlyersWeb
Copy link
Author

I've just corrected the bug. It should be

use JMS\Serializer\Annotation\ExclusionPolicy; 

not

use JMS\SerializerBundle\Annotation\ExclusionPolicy;

@baldurrensch
Copy link
Contributor

You want to require jms/serializer-bundle

@stof
Copy link
Contributor

stof commented Mar 21, 2013

@FlyersWeb you simply need to apply the UPGRADE instruction when going from 0.10- to 0.11+

@kfuchs
Copy link

kfuchs commented Apr 26, 2013

Had the same issue and removing "Bundle" worked as well.

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants