/**
  * Builds a boot sequence with the minimum modules necessary for both, compiletime
  * and runtime.
  *
  * @param string $identifier
  * @return \TYPO3\Flow\Core\Booting\Sequence
  * @api
  */
 public function buildEssentialsSequence($identifier)
 {
     $sequence = new Sequence($identifier);
     if ($this->context->isProduction()) {
         $lockManager = new \TYPO3\Flow\Core\LockManager();
         $lockManager->exitIfSiteLocked();
         if ($identifier === 'compiletime') {
             $lockManager->lockSiteOrExit();
             // make sure the site is unlocked even if the script ends unexpectedly due to an error/exception
             register_shutdown_function(array($lockManager, 'unlockSite'));
         }
         $this->setEarlyInstance(\TYPO3\Flow\Core\LockManager::class, $lockManager);
     }
     $sequence->addStep(new Step('typo3.flow:annotationregistry', array(\TYPO3\Flow\Core\Booting\Scripts::class, 'registerClassLoaderInAnnotationRegistry')));
     $sequence->addStep(new Step('typo3.flow:configuration', array(\TYPO3\Flow\Core\Booting\Scripts::class, 'initializeConfiguration')), 'typo3.flow:annotationregistry');
     $sequence->addStep(new Step('typo3.flow:systemlogger', array(\TYPO3\Flow\Core\Booting\Scripts::class, 'initializeSystemLogger')), 'typo3.flow:configuration');
     $sequence->addStep(new Step('typo3.flow:errorhandling', array(\TYPO3\Flow\Core\Booting\Scripts::class, 'initializeErrorHandling')), 'typo3.flow:systemlogger');
     $sequence->addStep(new Step('typo3.flow:cachemanagement', array(\TYPO3\Flow\Core\Booting\Scripts::class, 'initializeCacheManagement')), 'typo3.flow:systemlogger');
     return $sequence;
 }
 /**
  * Builds a boot sequence with the minimum modules necessary for both, compiletime
  * and runtime.
  *
  * @param string $identifier
  * @return \TYPO3\Flow\Core\Booting\Sequence
  * @api
  */
 public function buildEssentialsSequence($identifier)
 {
     $sequence = new Sequence($identifier);
     $sequence->addStep(new Step('typo3.flow:annotationregistry', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'registerClassLoaderInAnnotationRegistry')));
     $sequence->addStep(new Step('typo3.flow:configuration', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'initializeConfiguration')), 'typo3.flow:annotationregistry');
     $sequence->addStep(new Step('typo3.flow:systemlogger', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'initializeSystemLogger')), 'typo3.flow:configuration');
     if ($this->context->isProduction()) {
         $sequence->addStep(new Step('typo3.flow:lockmanager', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'initializeLockManager')), 'typo3.flow:systemlogger');
     }
     $sequence->addStep(new Step('typo3.flow:errorhandling', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'initializeErrorHandling')), 'typo3.flow:systemlogger');
     $sequence->addStep(new Step('typo3.flow:cachemanagement', array('TYPO3\\Flow\\Core\\Booting\\Scripts', 'initializeCacheManagement')), 'typo3.flow:systemlogger');
     return $sequence;
 }