Ensures that this Configuration instance contains settings that are
suitable for a production environment.

@throws ORMException If a configuration setting has a value that is not
suitable for a production environment.
554576
public function ensureProductionSettings() : void
    {
        $queryCacheImpl = $this->getQueryCacheImpl();

        if (! $queryCacheImpl) {
            throw QueryCacheNotConfigured::create();
        }

        if ($queryCacheImpl instanceof ArrayCache) {
            throw QueryCacheUsesNonPersistentCache::fromDriver($queryCacheImpl);
        }

        $metadataCacheImpl = $this->getMetadataCacheImpl();

        if (! $metadataCacheImpl) {
            throw MetadataCacheNotConfigured::create();
        }

        if ($metadataCacheImpl instanceof ArrayCache) {
            throw MetadataCacheUsesNonPersistentCache::fromDriver($metadataCacheImpl);
        }

        if ($this->getProxyManagerConfiguration()->getGeneratorStrategy() instanceof EvaluatingGeneratorStrategy) {
            throw ProxyClassesAlwaysRegenerating::create();
        }
    }
109637
public static function set() {

        $keys = func_get_args();
        $config = self::getConfig();

        if (!empty($keys) && !empty($config)) {

            $c = & $config;
            foreach ($keys as $key => $value) {

                if ($key == (Data::count($keys) - 1)) {

                    $c = $keys[Data::count($keys) - 1];
                } else {

                    if (!isset($c[$value])) {
                        $c[$value] = array();
                    }
                    if (isset($c[$value]) && is_object($c[$value])) {
                        $c[$value] = Format::objectToArray($c[$value]);
                    }
                    $c = & $c[$value];
                }
            }

            $configJson = Format::toJson($config, true);

            if(isset(self::$config)) {

                self::$config = $config;
            }

            if(File::write('../config/custom.config.json', $configJson)) {

                return true;
            }
        }

        return false;
    }
904198
private void checkConfiguration(JobExecutorXml jobExecutorXml) {
    Map<String, String> properties = jobExecutorXml.getProperties();
    for (Entry<String, String> entry : properties.entrySet()) {
      LOGGER.warning("Property " + entry.getKey() + " with value " + entry.getValue() + " from bpm-platform.xml will be ignored for JobExecutor.");
    }
  }
369903
def _ensureRequired(self):
        

        for configName, configDict in self.configs.items():
            if configDict['required']:
                if getattr(self._config, configName) is None:
                    raise MissingConfigurationException(configName)
53970
public function isValidDoctrineOrmModuleConfig()
    {
        $doctrineConfig = $this->getDoctrineConfig();

        return $this->isValidDoctrineOrmModuleEntityManagerConfig()
               && array_key_exists('configuration', $doctrineConfig) && is_array($doctrineConfig['configuration'])
               && array_key_exists('driver', $doctrineConfig) && is_array($doctrineConfig['driver']);
    }
868226
protected function configureEnvironment ()
    {
        $this->configureApp ();
        $this->configureDriverSettings ();
        $this->configureDatabase ();
        $this->configureMailSettings ();

        if (!$this->_createEnvFile ()) {
            $this->info ('');
            $this->error ('File not created');
            exit;
        }

        $this->info ('');
    }
126773
final public function setEnvironmentValue()
    {
        /**
         * Env file existence is verified in the controller.
         */
        $this->config()->setEnv(trim((string)file_get_contents($this->projectPath . '.env')));

        return true;
    }
493571
public function verifySettings()
    {
        if ($this->targetdir === null) {
            $this->setError("The targetdir attribute is required.");
        }
        if ($this->mapperElement === null) {
            $this->map = new IdentityMapper();
        } else {
            $this->map = $this->mapperElement->getImplementation();
        }
        if ($this->map === null) {
            $this->setError("Could not set <mapper> element.");
        }
    }
817597
protected function initialize() : void
    {
        $driver = $this->config->getMetadataDriverImpl();
        if ($driver === null) {
            throw ConfigurationException::noMetadataDriverConfigured();
        }

        $this->driver      = $driver;
        $this->evm         = $this->dm->getEventManager();
        $this->initialized = true;
    }
1206757
protected function validateConfig()
    {
        $fields = array_keys($this->config);
        if (array_intersect($this->requiredFields, $fields) != $this->requiredFields) {
            throw new Exception\ModuleConfigException(
                get_class($this),
                "\nOptions: " . implode(', ', $this->requiredFields) . " are required\n" .
                "Please, update the configuration and set all the required fields\n\n"
            );
        }
        if ($this instanceof RequiresPackage) {
            $errorMessage = '';
            foreach ($this->_requires() as $className => $package) {
                if (class_exists($className)) {
                    continue;
                }
                $errorMessage .= "Class $className can't be loaded, please add $package to composer.json\n";
            }
            if ($errorMessage) {
                throw new ModuleException($this, $errorMessage);
            }
        }
    }
297196
public function verifyConfig()
    {
        $keys = ['implementedFinders', 'implementedMethods'];
        foreach ($keys as $key) {
            if (!isset($this->_config[$key])) {
                continue;
            }

            foreach ($this->_config[$key] as $method) {
                if (!is_callable([$this, $method])) {
                    throw new Exception(sprintf('The method %s is not callable on class %s', $method, get_class($this)));
                }
            }
        }
    }
459565
public function unsetTemporaryRegion(): self
	{
		if ($this->isSettingSet(self::SET_ORIG_REGION))
		{
			$region = $this->getSetting(self::SET_ORIG_REGION);
			$this->setSetting(self::SET_REGION, $region);
			$this->setSetting(self::SET_PLATFORM, $this->platforms->getPlatformName($region));
			$this->setSetting(self::SET_ORIG_REGION, null);
		}
		return $this;
	}
227561
protected function validateConfig()
    {
        $defaults = [
            'tpl_folder',
            'cache_folder',
            'tpl_file_format',
            //'compress',
            //'event_emitter',
        ];

        foreach ($defaults as $key) {
            if (! isset($this->config[$key])) {
                throw new InvalidConfigException(sprintf("Missing a configuration key (%s)", $key));
            }
        }
    }
1153587
private static void validateSetting(ConfigurationSetting setting) {
        Objects.requireNonNull(setting);

        if (setting.key() == null) {
            throw new IllegalArgumentException("Parameter 'key' is required and cannot be null.");
        }
    }
1023417
protected function setOptions()
    {
        $this->ssoServerUrl = null;
        $this->brokerName = null;
        $this->brokerSecret = null;

        if (!$this->ssoServerUrl || !$this->brokerName || !$this->brokerSecret) {
            throw new Exception('Missing configuration values.');
        }
    }
1139448
protected function applyConfig()
    {
        foreach ($this->config as $k => $v) {
            if (is_object($v) && $v instanceof Config\Entry\Generic) {
                $v = $v->getValue();
            }
            $k = strtolower($k);
            if ($k === 'connectionclass') {
                $this->connectionClass = $v;
            } elseif ($k === 'name') {
                $this->name = $v;
            } elseif ($k === 'maxallowedpacket') {
                $this->maxAllowedPacket = (int)$v;
            } elseif ($k === 'maxconcurrency') {
                $this->maxConcurrency = (int)$v;
            }
        }
    }
400262
public function verifySettings()
    {
        if ($this->type === null) {
            $this->setError("The type attribute is required");
        } elseif (!in_array($this->type, self::$types, true)) {
            $this->setError("Invalid type specified; must be one of (" . implode(self::$types) . ")");
        }
    }