/** * Ensures that this Configuration instance contains settings that are * suitable for a production environment. * * @return void * * @throws ORMException If a configuration setting has a value that is not * suitable for a production environment. */ public function ensureProductionSettings() { $queryCacheImpl = $this->getQueryCacheImpl(); if (!$queryCacheImpl) { throw ORMException::queryCacheNotConfigured(); } if ($queryCacheImpl instanceof ArrayCache) { throw ORMException::queryCacheUsesNonPersistentCache($queryCacheImpl); } $metadataCacheImpl = $this->getMetadataCacheImpl(); if (!$metadataCacheImpl) { throw ORMException::metadataCacheNotConfigured(); } if ($metadataCacheImpl instanceof ArrayCache) { throw ORMException::metadataCacheUsesNonPersistentCache($metadataCacheImpl); } if ($this->getAutoGenerateProxyClasses()) { throw ORMException::proxyClassesAlwaysRegenerating(); } }