/**
  * Executes this task
  *
  * @param \TYPO3\Surf\Domain\Model\Node $node
  * @param \TYPO3\Surf\Domain\Model\Application $application
  * @param \TYPO3\Surf\Domain\Model\Deployment $deployment
  * @param array $options
  * @return void
  * @throws \TYPO3\Surf\Exception\TaskExecutionException
  */
 public function execute(Node $node, Application $application, Deployment $deployment, array $options = array())
 {
     parent::execute($node, $application, $deployment, $options);
     $settingsPatch = \Symfony\Component\Yaml\Yaml::parse(file_get_contents($this->resourcePath . '/Settings.yaml'));
     $settings = (array) \Symfony\Component\Yaml\Yaml::parse(FLOW_PATH_ROOT . '/Configuration/Settings.yaml');
     $settings = \TYPO3\Flow\Utility\Arrays::arrayMergeRecursiveOverrule($settings, $settingsPatch);
     $patchedSettings = $this->temporaryPath . '/Settings.yaml';
     file_put_contents($patchedSettings, \Symfony\Component\Yaml\Yaml::dump($settings, 999));
     $patchedSettingsTargetPath = $deployment->getApplicationReleasePath($application) . '/Configuration/Settings.yaml';
     $this->copy($patchedSettings, $patchedSettingsTargetPath);
 }
 /**
  * Executes this task
  *
  * @param \TYPO3\Surf\Domain\Model\Node $node
  * @param \TYPO3\Surf\Domain\Model\Application $application
  * @param \TYPO3\Surf\Domain\Model\Deployment $deployment
  * @param array $options
  * @return void
  * @throws \TYPO3\Surf\Exception\TaskExecutionException
  */
 public function execute(Node $node, Application $application, Deployment $deployment, array $options = array())
 {
     parent::execute($node, $application, $deployment, $options);
     $settings = \Symfony\Component\Yaml\Yaml::parse(file_get_contents($this->resourcePath . '/Settings.yaml'));
     if (isset($settings['TYPO3']['Flow']['core']['phpBinaryPathAndFilename'])) {
         $phpPath = $settings['TYPO3']['Flow']['core']['phpBinaryPathAndFilename'];
         $composerCommandPath = $application->getOption('composerCommandPath');
         if (pathinfo($composerCommandPath, PATHINFO_EXTENSION) == 'phar') {
             $application->setOption('composerCommandPath', $phpPath . ' ' . $composerCommandPath);
         }
     }
 }
 /**
  * Executes this task
  *
  * @param \TYPO3\Surf\Domain\Model\Node $node
  * @param \TYPO3\Surf\Domain\Model\Application $application
  * @param \TYPO3\Surf\Domain\Model\Deployment $deployment
  * @param array $options
  * @return void
  * @throws \TYPO3\Surf\Exception\TaskExecutionException
  */
 public function execute(Node $node, Application $application, Deployment $deployment, array $options = array())
 {
     parent::execute($node, $application, $deployment, $options);
     $settings = \Symfony\Component\Yaml\Yaml::parse(file_get_contents($this->resourcePath . '/Settings.yaml'));
     if (isset($settings['TYPO3']['Flow']['core']['phpBinaryPathAndFilename'])) {
         $lines = file(FLOW_PATH_ROOT . '/flow');
         $lines[0] = '#!' . $settings['TYPO3']['Flow']['core']['phpBinaryPathAndFilename'];
         $source = $this->temporaryPath . '/flow';
         file_put_contents($source, implode("\n", $lines));
         $destination = $deployment->getApplicationReleasePath($application) . '/flow';
         $this->copy($source, $destination);
     }
 }
 /**
  * Executes this task
  *
  * @param \TYPO3\Surf\Domain\Model\Node $node
  * @param \TYPO3\Surf\Domain\Model\Application $application
  * @param \TYPO3\Surf\Domain\Model\Deployment $deployment
  * @param array $options
  * @return void
  * @throws \TYPO3\Surf\Exception\TaskExecutionException
  */
 public function execute(Node $node, Application $application, Deployment $deployment, array $options = array())
 {
     parent::execute($node, $application, $deployment, $options);
     if ($application->hasOption('defaultContext')) {
         $code = file_get_contents(FLOW_PATH_ROOT . '/Web/index.php');
         $code = str_replace('\'Development\'', '\'' . $application->getOption('defaultContext') . '\'', $code);
         $source = $this->temporaryPath . '/index.php';
         file_put_contents($source, $code);
         $destination = $deployment->getApplicationReleasePath($application) . '/Web/index.php';
         $this->copy($source, $destination);
         $code = file_get_contents(FLOW_PATH_ROOT . '/Packages/Framework/TYPO3.Flow/Scripts/flow.php');
         $code = str_replace('\'Development\'', '\'' . $application->getOption('defaultContext') . '\'', $code);
         $source = $this->temporaryPath . '/flow.php';
         file_put_contents($source, $code);
         $destination = $deployment->getApplicationReleasePath($application) . '/Packages/Framework/TYPO3.Flow/Scripts/flow.php';
         $this->copy($source, $destination);
     }
 }