rectorphp/rector-doctrine

Add DoctrinePHPDocInfoRector to fix Entity PHPDoc by Doctrine Metadata

alexander-schranz opened this issue · 2 comments

Similar to rectorphp/rector-phpunit#114, rectorphp/rector-phpunit#114 / rectorphp/rector-phpunit#115

I would like to set the PHPDocInfo @var based on doctrine metadata. Via phpstan-doctrine phpstan already knows the correct type from the Doctrine Metadata () which should be set to the property and getter of that property.

I'm not yet sure how I can access the expected PHPStan type. Any hints how to achieve this would be welcome.

Its been a while since this issue was created. I would suggest to start a pull request containing test with what you want to achieve. That way other devs can easily see what it is you want and what might then be useful. At least that is what i would do