foreach($this->registry->getManagers()as$em){ // we need the directory no matter the proxy cache generation strategy
if(!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())){ if(false === @mkdir($proxyCacheDir, 0777, true) && !is_dir($proxyCacheDir)){ thrownew \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory "%s".', $proxyCacheDir)); } }elseif(!is_writable($proxyCacheDir)){ thrownew \RuntimeException(sprintf('The Doctrine Proxy directory "%s" is not writeable for the current system user.', $proxyCacheDir)); }
// if proxies are autogenerated we don't need to generate them in the cache warmer
if($em->getConfiguration()->getAutoGenerateProxyClasses()){ continue; }