Overview of merged pull requests¶
With the changes in #2423 the PersistenceManager was registered as a Doctrine EventListener. Hence, when building the EntityManager, the PersistenceManager got instanciated with a completely new non-lazy EntityManager. This caused errors when trying to persist entities, as they were not known to that instance of the EntityManager. This change makes the EntityManager instanciation lazy again and handles the type mismatch of the lazy DependencyProxy in the SchemaTool.
This is an alternative fix to #2448