add failing testcase for PropertyTypeDeclarationRector#1795
add failing testcase for PropertyTypeDeclarationRector#1795bendavies wants to merge 1 commit intorectorphp:masterfrom
Conversation
5b65fbf to
cbdd92e
Compare
| { | ||
| /** | ||
| * @ORM\OneToMany(targetEntity="Product") | ||
| * @var Product[]|\Doctrine\Common\Collections\Collection |
There was a problem hiding this comment.
These should be FQN, so the annotation output is consistent
| class Company | ||
| { | ||
| } | ||
| } |
There was a problem hiding this comment.
These should be in /Source.
/Fixture directory is only for tested code (a code that will be changed)
Glad you like it and thanks for fast testing 👍
I didn't know that, thanks for the test! |
|
Looks like I was little faster #1793 :) |
|
Oh, I didn't realize it's the same issue :) allright then |
|
@bendavies Partially covered by #1793, but this PR better covers case like aliases and one to many, so I'd like to merge this one as well. Just use FQN in fixed code and it's ready to merge |
| private $company; | ||
|
|
||
| /** | ||
| * @ORM\OneToOne(targetEntity="Entity\Company") |
There was a problem hiding this comment.
Accoding to Doctrine docs this can't work, as it is in a different namespace.
|
Closing as all the working features are already included in #1793 Thank you for pointing out the weak spot! |

I tried out https://www.tomasvotruba.cz/blog/2019/07/29/how-we-completed-thousands-of-missing-var-annotations-in-a-day/
Thanks, this is great!
Here's a failing testcase for
PropertyTypeDeclarationRectorwith doctrine relations.Doctrine does not require you to set fully quantified class names for relation classes - it will look at the class
usestatements.