Closed ThomasLandauer closed 4 years ago
The EntityManager
class implements the EntityManagerInterface
which extends the interface ObjectManager
. I don't see why that should be an issue here.
You should probably use Doctrine\Persistence\ObjectManager
here.
@greg0ire cool - thanks - that fixed it for me!
Should I make a PR and change use Doctrine\Common\Persistence\ObjectManager;
right away at https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#writing-fixtures ?
Yes please!
There you go :-) https://github.com/doctrine/DoctrineFixturesBundle/pull/324
I'm getting this error from phpstan:
Following https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html this is what I have in the file:
And indeed, the output I'm getting is:
So
EntityManager
gets injected, whereasload()
expectsObjectManager