/**
  * Initializes the Configuration Manager, the Flow settings and the Environment service
  *
  * @param Bootstrap $bootstrap
  * @return void
  */
 public static function initializeConfiguration(Bootstrap $bootstrap)
 {
     $context = $bootstrap->getContext();
     $packageManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Package\\PackageManagerInterface');
     $configurationManager = new \TYPO3\Flow\Configuration\ConfigurationManager($context);
     $configurationManager->injectConfigurationSource(new \TYPO3\Flow\Configuration\Source\YamlSource());
     $configurationManager->loadConfigurationCache();
     $configurationManager->setPackages($packageManager->getActivePackages());
     $settings = $configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
     $environment = new \TYPO3\Flow\Utility\Environment($context);
     $environment->setTemporaryDirectoryBase($settings['utility']['environment']['temporaryDirectoryBase']);
     $configurationManager->injectEnvironment($environment);
     $packageManager->injectSettings($settings);
     $bootstrap->getSignalSlotDispatcher()->dispatch('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', array($configurationManager));
     $bootstrap->setEarlyInstance('TYPO3\\Flow\\Configuration\\ConfigurationManager', $configurationManager);
     $bootstrap->setEarlyInstance('TYPO3\\Flow\\Utility\\Environment', $environment);
 }
 /**
  * Initializes the Configuration Manager, the Flow settings and the Environment service
  *
  * @param Bootstrap $bootstrap
  * @return void
  * @throws \TYPO3\Flow\Exception
  */
 public static function initializeConfiguration(Bootstrap $bootstrap)
 {
     $context = $bootstrap->getContext();
     $packageManager = $bootstrap->getEarlyInstance(\TYPO3\Flow\Package\PackageManagerInterface::class);
     $configurationManager = new \TYPO3\Flow\Configuration\ConfigurationManager($context);
     $configurationManager->injectConfigurationSource(new \TYPO3\Flow\Configuration\Source\YamlSource());
     $configurationManager->loadConfigurationCache();
     $configurationManager->setPackages($packageManager->getActivePackages());
     $settings = $configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
     $environment = new \TYPO3\Flow\Utility\Environment($context);
     if (isset($settings['utility']['environment']['temporaryDirectoryBase'])) {
         $defaultTemporaryDirectoryBase = FLOW_PATH_DATA . '/Temporary';
         if (FLOW_PATH_TEMPORARY_BASE !== $defaultTemporaryDirectoryBase) {
             throw new \TYPO3\Flow\Exception(sprintf('It seems like the PHP default temporary base path has been changed from "%s" to "%s" via the FLOW_PATH_TEMPORARY_BASE environment variable. If that variable is present, the TYPO3.Flow.utility.environment.temporaryDirectoryBase setting must not be specified!', $defaultTemporaryDirectoryBase, FLOW_PATH_TEMPORARY_BASE), 1447707261);
         }
         $environment->setTemporaryDirectoryBase($settings['utility']['environment']['temporaryDirectoryBase']);
     } else {
         $environment->setTemporaryDirectoryBase(FLOW_PATH_TEMPORARY_BASE);
     }
     $configurationManager->injectEnvironment($environment);
     $packageManager->injectSettings($settings);
     $bootstrap->getSignalSlotDispatcher()->dispatch(\TYPO3\Flow\Configuration\ConfigurationManager::class, 'configurationManagerReady', array($configurationManager));
     $bootstrap->setEarlyInstance(\TYPO3\Flow\Configuration\ConfigurationManager::class, $configurationManager);
     $bootstrap->setEarlyInstance(\TYPO3\Flow\Utility\Environment::class, $environment);
 }