null, ]; public function _depends(): array { return [Symfony::class => $this->dependencyMessage]; } public function _inject(Symfony $symfony): void { $this->symfony = $symfony; } /** * Executed before tests. * * Fix "The EntityManager is closed" after test failure. If EntityManager is closed, reset it. */ public function _before(TestInterface $test): void { parent::_before($test); /** @var ManagerRegistry $doctrine */ $doctrine = $this->symfony->grabService('doctrine'); if (!$doctrine->getManager()->isOpen()) { $doctrine->resetManager(); } } }