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

ParamConverter not associated with @Annotation (cache must be cleared after any file change) #7283

Closed
catchamonkey opened this issue Mar 6, 2013 · 4 comments

Comments

@catchamonkey
Copy link
Contributor

Hi,

Within 2.2.0 I have an issue with the ParamConverter annotations.
The actual annotation itself seems fine, but each time I make a change in the Controller in question, it fails to load and I must clear the cache (even in dev).
The change doesn't even have to be code, even comment and whitespace changes trigger this problem.

The error it reports is:

Cannot import resource "/home/sites/MySite/src/Acme/Bundle/MyBundle/Controller/" from "/home/sites/MySite/app/config/routing.yml".

FileLoaderLoadException: Cannot import resource "/home/sites/MySite/src/Acme/Bundle/MyBundle/Controller/" from "/home/sites/MySite/app/config/routing.yml"

AnnotationException: [Semantical Error] The class "Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter". If it is indeed no annotation, then you need to add @IgnoreAnnotation("ParamConverter") to the _class_ doc comment of method Acme\Bundle\MyBundle\Controller\DefaultController::viewAction().

Others also confirm this issue;

http://stackoverflow.com/questions/15247170/symfony2-paramconverter-not-associated-with-annotation-cache-must-be-cleared-a

@fabpot
Copy link
Member

fabpot commented Mar 6, 2013

This is (unfortunately) a known bug that has been fixed now: sensiolabs/SensioFrameworkExtraBundle@75d0f63

@fabpot fabpot closed this as completed Mar 6, 2013
@catchamonkey
Copy link
Contributor Author

Ah OK no problem.
What's the best way to get this so it works in 2.2.0?

@stof
Copy link
Member

stof commented Mar 6, 2013

@catchamonkey update your version of the bundle

@catchamonkey
Copy link
Contributor Author

Hi @stof
Yes, of course I have done that, and for my projects it's no issue.

I was more thinking about users that are installing 2.2.0 and will hit this problem every time, as the composer in the standard-edition is still referencing the broken FrameworkExtraBundle version.

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

3 participants