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

Impossible to declare types for Doctrine entities #21

Open
Kolyunya opened this issue Jan 3, 2021 · 3 comments
Open

Impossible to declare types for Doctrine entities #21

Kolyunya opened this issue Jan 3, 2021 · 3 comments

Comments

@Kolyunya
Copy link
Contributor

Kolyunya commented Jan 3, 2021

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.

@BenMorel
Copy link
Member

BenMorel commented Jan 5, 2021

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.

@BenMorel
Copy link
Member

BenMorel commented Feb 8, 2021

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!

@Kolyunya
Copy link
Contributor Author

@BenMorel thanks for digging into this one. I'm going to make a demo repository.

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

2 participants