Added Doctrine EventListener depending on EntityManager to show the bug symfony/symfony#8425