/** * Register tasks for this application * * @param Workflow $workflow * @param Deployment $deployment * @return void */ public function registerTasks(Workflow $workflow, Deployment $deployment) { parent::registerTasks($workflow, $deployment); if ($deployment->hasOption('initialDeployment') && $deployment->getOption('initialDeployment') === true) { $workflow->addTask('TYPO3\\Surf\\Task\\DumpDatabaseTask', 'initialize', $this); $workflow->addTask('TYPO3\\Surf\\Task\\RsyncFoldersTask', 'initialize', $this); } $workflow->afterStage('transfer', 'TYPO3\\Surf\\Task\\TYPO3\\CMS\\CreatePackageStatesTask', $this)->afterStage('update', array('TYPO3\\Surf\\Task\\TYPO3\\CMS\\SymlinkDataTask', 'TYPO3\\Surf\\Task\\TYPO3\\CMS\\CopyConfigurationTask'), $this)->afterStage('switch', 'TYPO3\\Surf\\Task\\TYPO3\\CMS\\FlushCachesTask', $this)->addTask('TYPO3\\Surf\\Task\\TYPO3\\CMS\\SetUpExtensionsTask', 'migrate', $this); }
/** * @param Workflow $workflow * @param string $packageMethod */ protected function registerTasksForPackageMethod(Workflow $workflow, $packageMethod) { parent::registerTasksForPackageMethod($workflow, $packageMethod); switch ($packageMethod) { case 'git': $workflow->afterTask('TYPO3\\Surf\\DefinedTask\\Composer\\LocalInstallTask', 'TYPO3\\Surf\\Task\\TYPO3\\CMS\\CreatePackageStatesTask', $this); break; } }
/** * @param Workflow $workflow * @param string $packageMethod */ protected function registerTasksForPackageMethod(Workflow $workflow, $packageMethod) { parent::registerTasksForPackageMethod($workflow, $packageMethod); switch ($packageMethod) { case 'git': $workflow->defineTask('typo3.surf:composer:localInstall', 'typo3.surf:composer:install', array('nodeName' => 'localhost', 'useApplicationWorkspace' => TRUE)); $workflow->afterStage('package', 'typo3.surf:composer:localInstall', $this)->afterTask('typo3.surf:composer:localInstall', 'typo3.surf.cms:typo3:cms:createPackageStates', $this); break; } }
/** * Add support for updateMethod "composer" * * @param \TYPO3\Surf\Domain\Model\Workflow $workflow * @param string $updateMethod * @return void */ protected function registerTasksForUpdateMethod(Workflow $workflow, $updateMethod) { switch ($updateMethod) { case 'composer': $workflow->addTask('TYPO3\\Surf\\Task\\Composer\\InstallTask', 'update', $this); break; default: parent::registerTasksForUpdateMethod($workflow, $updateMethod); break; } }