Probably because I removed "doctrine" from my config file.. But since I'm using mongo (and mongo-doctrine) what I need Doctrine itself for?
Fix some undefined annotations
[Semantical Error] The annotation "@proxy" in method Doctrine\MongoDB\Connecti
on::close() was never imported. Did you maybe forget to add a "use" statement fo
r this annotation?
@kusmierz: Do you have any idea why this class was being scanned for annotations? I also noticed your comment on
d5ae19d reporting the same.
IIRC, these files were never scanned in the past. It makes me wonder if a recent change to the annotation driver has resulted in it scanning many more things than it should.
I think it's because JMS\SecurityExtraBundle
Ok, your first comment in this PR (when you alluded to Doctrine ORM) confused me, as Proxy isn't an annotation class in that library: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
@proxy was simply a custom doc-block tag being used to denote methods that proxied another on the wrapped object (\Mongo in this case). This sounds more like a bug with JMSSecurityExtraBundle instead of Doctrine.
@schmittjoh: can you comment?
It could under certain circumstances be scanned if it is a service, and secure_all_services is turned on.
At any rate, I think the class should be compatible with Doctrine's annotation reader. As the @proxy annotation is not ignored by default and I'm not sure whether it makes sense to add it (How common is the annotation? Is it a PHPdoc annotation?), one option is to add @IgnoreAnnotation("proxy") to the Connection's class doc comment, or the other, remove the annotation (what this PR suggests).
It's certainly not common or standard (I've never seen it outside of Doctrine's wrapper classes). I suppose we could ask @beberlei or @jwage if it's really used for anything, such as API docs.
Thanks for pointing out the @IgnoreAnnotation solution, though. I wasn't aware that existed (nor the whitelist in the annotation reader).
Remove @proxy doc tags to appease AnnotationReader (fixes #51)
Remove stray @proxy doc tag