Closed mdevlamynck closed 1 year ago
Cc @VincentLanglet
Maybe the custom getRealClass
implementation should be replaced by Doctrine\Common\Util\ClassUtils::getRealClass()
I just tried it indeed fixes the issue. I'll make a PR, thx :)
This library does not have a dependency on doctrine/common
, and I don't think we want to introduce one (we're trying to get rid of doctrine/common
entirely).
You prefer simply copying the code of ClassUtils::getRealClass() in this project?
I guess
Since v1.6.0 our tests fail when loading fixtures for entities with a Proxy suffix in their name.
For example with the entity
Path\To\Entities\EntityProxy
we get aDoctrine\Persistence\Mapping\MappingException: Class 'Path\To\Entities\Entity' does not exist
error.I think the bug was introduced in https://github.com/doctrine/data-fixtures/pull/409. The
getRealClass
removes theProxy
suffix. Maybe the check to remove the suffixProxy
could be made more specific to actual proxies?