private function clearEntityManagers()
    {
        foreach ($this->managerRegistry->getManagers() as /* @var $manager EntityManager */ $manager) {
            if (!$manager instanceof EntityManager) {
                continue;
            }
            $manager->clear();
            if (!$manager->getConnection()->ping()) {
                $manager->getConnection()->close();
                $manager->close();
            }
        }
    }
private function clearEntityManagers()
    {
        foreach ($this->managerRegistry->getManagers() as /* @var $manager EntityManager */ $manager) {
            if (!$manager instanceof EntityManager) {
                continue;
            }
            $manager->clear();
            if (!$manager->getConnection()->ping()) {
                $manager->getConnection()->close();
                $manager->close();
            }
        }
    }
private function clearEntityManagers ( ) { foreach ( $ this -> managerRegistry -> getManagers ( ) as /* @var $manager EntityManager */ $ manager ) { if ( ! $ manager instanceof EntityManager ) { continue ; } $ manager -> clear ( ) ; if ( ! $ manager -> getConnection ( ) -> ping ( ) ) { $ manager -> getConnection ( ) -> close ( ) ; $ manager -> close ( ) ; } } }
Clear entity managers and close broken managers.
Clear entity managers and close broken managers .