Hi!
Thank you for this project - it's awesome and we use it a lot!
But I noticed, currently, phpstan-doctrine doesn't support analysing of always-read and written properties in ODM documents like this:
/**
* @ODM\Document
*/
class MyDocument
{
/** @ODM\Id */
private int $id;
/** @ODM\Field */
private int $myField;
private int $unused;
}
PHPStan reports that all three properties are unused.
I found src/Rules/Doctrine/ORM/PropertiesExtension.php but it's working only with ORM entities.
I don't have experience in writing extension for PHPStan, but I think I can write a similar implementation for ODM by analogy with ORM.
What do you think?
Hi! Thank you for this project - it's awesome and we use it a lot!
But I noticed, currently, phpstan-doctrine doesn't support analysing of always-read and written properties in ODM documents like this:
PHPStan reports that all three properties are unused.
I found
src/Rules/Doctrine/ORM/PropertiesExtension.php
but it's working only with ORM entities.I don't have experience in writing extension for PHPStan, but I think I can write a similar implementation for ODM by analogy with ORM. What do you think?