Impossible to declare types for Doctrine entities
I was trying to incorporate Doctrine types into my project. Types themselves seem to be working fine. But I came across a problem with type declarations of properties. When I declare property type like this
private Point $point;
I get a error:
The annotation "@noproxy" in method Brick\Geo\Point::geometryType() was never imported. Did you maybe forget to add "use" statement for this annotation?
Moreover this problem persists even if I give up the PHP type declarations and use PHPDoc instead.
So the only option is to remove all type declarations altogether which is obviously a huge issue.
Hmm, I'm surprised as last time I checked it was working, moreover Doctrine Annotations should only complain if you use a non-imported annotation in your code, not third-party, AFAIK.
Let me check this on a brand new project and I'll come back to you.
Hi again, sorry for the delay.
I tried to reproduce your issue but failed. Here is a test project you can clone:
https://gist.github.com/BenMorel/d88fb4411a3c0fbd924df7def2d94074
Please see if you can reproduce the issue, or fix it by playing with Doctrine configuration!
@BenMorel thanks for digging into this one. I'm going to make a demo repository.