Expected parameter of type '\App\Entity\User', 'object' provided
Hi,
Since PhpStorm updated to 2020.1.1 RC I've got this warning inspection :

here is the setCreatedBy declaration :

Invalidating and restarting doesn't help.
Thanks for any help.
请先登录再写评论。
Unfortunately, it is hard to say anything for sure without checking the project first. Would it be possible to share a minimal set of files to reproduce the warning?
Hi,
there is nothing paticular in the project.
I have a :
User entity :
BlameableEntity :
In my entity, I call for the BlameableEntity :
And then in a Controller :
It does this with every ManyToOne relation.
My phpstorm version : 2020.1.1 RC with Symfony and PHP Annotations plugins.
OS : linux mint 18
Thanks again
I created a simple project from scratch that show the warning message inside the controller :
git@gitlab.com:gaea44/tests.git
Thanks for a project. The type is coming from vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php:
You can either correct the PhpDoc there, or rather add
/** @var Test2|object|null $test2 */
PHPDoc above $test2: