repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
TYPO3/Surf | src/Domain/Model/Application.php | Application.setReleasesDirectory | public function setReleasesDirectory($releasesDirectory)
{
if (preg_match('/(^|\/)\.\.(\/|$)/', $releasesDirectory)) {
throw new InvalidConfigurationException(
sprintf('"../" is not allowed in the releases directory "%s"', $releasesDirectory),
1380870750
... | php | public function setReleasesDirectory($releasesDirectory)
{
if (preg_match('/(^|\/)\.\.(\/|$)/', $releasesDirectory)) {
throw new InvalidConfigurationException(
sprintf('"../" is not allowed in the releases directory "%s"', $releasesDirectory),
1380870750
... | [
"public",
"function",
"setReleasesDirectory",
"(",
"$",
"releasesDirectory",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/(^|\\/)\\.\\.(\\/|$)/'",
",",
"$",
"releasesDirectory",
")",
")",
"{",
"throw",
"new",
"InvalidConfigurationException",
"(",
"sprintf",
"(",
"'\".... | Sets the releases directory
@param string $releasesDirectory
@return \TYPO3\Surf\Domain\Model\Application The current instance for chaining | [
"Sets",
"the",
"releases",
"directory"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Application.php#L242-L252 |
TYPO3/Surf | src/Domain/Model/Application.php | Application.getOptions | public function getOptions()
{
return array_merge($this->options, [
'deploymentPath' => $this->getDeploymentPath(),
'releasesPath' => $this->getReleasesPath(),
'sharedPath' => $this->getSharedPath()
]);
} | php | public function getOptions()
{
return array_merge($this->options, [
'deploymentPath' => $this->getDeploymentPath(),
'releasesPath' => $this->getReleasesPath(),
'sharedPath' => $this->getSharedPath()
]);
} | [
"public",
"function",
"getOptions",
"(",
")",
"{",
"return",
"array_merge",
"(",
"$",
"this",
"->",
"options",
",",
"[",
"'deploymentPath'",
"=>",
"$",
"this",
"->",
"getDeploymentPath",
"(",
")",
",",
"'releasesPath'",
"=>",
"$",
"this",
"->",
"getReleasesP... | Get all options defined on this application instance
The options will include the deploymentPath and sharedPath for
unified option handling.
@return array An array of options indexed by option key | [
"Get",
"all",
"options",
"defined",
"on",
"this",
"application",
"instance"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Application.php#L272-L279 |
TYPO3/Surf | src/Domain/Model/Application.php | Application.getOption | public function getOption($key)
{
switch ($key) {
case 'deploymentPath':
return $this->getDeploymentPath();
case 'releasesPath':
return $this->getReleasesPath();
case 'sharedPath':
return $this->getSharedPath();
... | php | public function getOption($key)
{
switch ($key) {
case 'deploymentPath':
return $this->getDeploymentPath();
case 'releasesPath':
return $this->getReleasesPath();
case 'sharedPath':
return $this->getSharedPath();
... | [
"public",
"function",
"getOption",
"(",
"$",
"key",
")",
"{",
"switch",
"(",
"$",
"key",
")",
"{",
"case",
"'deploymentPath'",
":",
"return",
"$",
"this",
"->",
"getDeploymentPath",
"(",
")",
";",
"case",
"'releasesPath'",
":",
"return",
"$",
"this",
"->... | Get an option defined on this application instance
@param string $key
@return mixed | [
"Get",
"an",
"option",
"defined",
"on",
"this",
"application",
"instance"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Application.php#L287-L299 |
TYPO3/Surf | src/Task/TYPO3/CMS/ActivatePackagesTask.php | ActivatePackagesTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
try {
$scriptFileName = $this->getConsoleScriptFileName($node, $application, $deployment, $options);
} catch (InvalidConf... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
try {
$scriptFileName = $this->getConsoleScriptFileName($node, $application, $deployment, $options);
} catch (InvalidConf... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"ensureApplicationIsTypo3Cms",
"(",
"$",
"app... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/ActivatePackagesTask.php#L44-L64 |
TYPO3/Surf | src/Task/TYPO3/CMS/SymlinkDataTask.php | SymlinkDataTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$targetReleasePath = $deployment->getApplicationReleasePath($application);
$webDirectory = $options['webDirectory'];
$relativeDat... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$targetReleasePath = $deployment->getApplicationReleasePath($application);
$webDirectory = $options['webDirectory'];
$relativeDat... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"(... | 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 | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/SymlinkDataTask.php#L38-L63 |
TYPO3/Surf | src/Domain/Model/Task.php | Task.rollback | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->configureOptions($options);
} | php | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->configureOptions($options);
} | [
"public",
"function",
"rollback",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"configureOptions",
"(",
"$",
"options",
"... | Rollback 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 | [
"Rollback",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Task.php#L46-L49 |
TYPO3/Surf | src/Domain/Model/Task.php | Task.configureOptions | protected function configureOptions(array $options = [])
{
try {
$resolver = new OptionsResolver();
// We set all global options as defined options, otherwise we would get a lot of exceptions
$resolver->setDefined(array_keys($options));
$this->resolveOptions($... | php | protected function configureOptions(array $options = [])
{
try {
$resolver = new OptionsResolver();
// We set all global options as defined options, otherwise we would get a lot of exceptions
$resolver->setDefined(array_keys($options));
$this->resolveOptions($... | [
"protected",
"function",
"configureOptions",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"try",
"{",
"$",
"resolver",
"=",
"new",
"OptionsResolver",
"(",
")",
";",
"// We set all global options as defined options, otherwise we would get a lot of exceptions",
... | @param array $options
@return array
@throws \Exception | [
"@param",
"array",
"$options"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Task.php#L70-L93 |
TYPO3/Surf | src/Task/Neos/Flow/SymlinkDataTask.php | SymlinkDataTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$releaseIdentifier = $deployment->getReleaseIdentifier();
$releasesPath = $application->getReleasesPath();
$commands = [
"mkdir -p $releasesPath/$releaseIdentifier/Data",
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$releaseIdentifier = $deployment->getReleaseIdentifier();
$releasesPath = $application->getReleasesPath();
$commands = [
"mkdir -p $releasesPath/$releaseIdentifier/Data",
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"releaseIdentifier",
"=",
"$",
"deployment",
"->",
"getRele... | Executes this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/SymlinkDataTask.php#L35-L46 |
TYPO3/Surf | src/Task/Release/ReleaseTask.php | ReleaseTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$host = $options['releaseHost'];
$login = $options['releaseHostLogin'];
$changeLogUri = $options['changeLogUri'];
$siteP... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$host = $options['releaseHost'];
$login = $options['releaseHostLogin'];
$changeLogUri = $options['changeLogUri'];
$siteP... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"(... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Release/ReleaseTask.php#L29-L41 |
TYPO3/Surf | src/Task/TYPO3/CMS/CompareDatabaseTask.php | CompareDatabaseTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
$cliArguments = $this->getSuitableCliArguments($node, $application, $deployment, $options);
if (empty($cliArguments)) {
$... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
$cliArguments = $this->getSuitableCliArguments($node, $application, $deployment, $options);
if (empty($cliArguments)) {
$... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"ensureApplicationIsTypo3Cms",
"(",
"$",
"app... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/CompareDatabaseTask.php#L43-L58 |
TYPO3/Surf | src/Task/Neos/Flow/CreateDirectoriesTask.php | CreateDirectoriesTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = [
'directories' => [
'shared/Data/Logs',
'shared/Data/Persistent',
'shared/Configuration'
],
'baseDirect... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = [
'directories' => [
'shared/Data/Logs',
'shared/Data/Persistent',
'shared/Configuration'
],
'baseDirect... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"[",
"'directories'",
"=>",
"[",
"'shared... | Execute this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/CreateDirectoriesTask.php#L30-L41 |
TYPO3/Surf | src/Command/ShowCommand.php | ShowCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentNames = $this->factory->getDeploymentNames($configurationPath);
$output->writeln(sprintf(PHP_EOL . '<u>Deployments in "%s":</u>' . PHP_EOL, $t... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentNames = $this->factory->getDeploymentNames($configurationPath);
$output->writeln(sprintf(PHP_EOL . '<u>Deployments in "%s":</u>' . PHP_EOL, $t... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"configurationPath",
"=",
"$",
"input",
"->",
"getOption",
"(",
"'configurationPath'",
")",
";",
"$",
"deploymentNames",
"=",
"$",
"t... | Execute
@param InputInterface $input
@param OutputInterface $output | [
"Execute"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/ShowCommand.php#L46-L57 |
TYPO3/Surf | src/Command/DescribeCommand.php | DescribeCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->output = $output;
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$deployment = $this->factory->get... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->output = $output;
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$deployment = $this->factory->get... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"this",
"->",
"input",
"=",
"$",
"input",
";",
"$",
"this",
"->",
"output",
"=",
"$",
"output",
";",
"$",
"configurationPath",
... | Prints configuration for the
@param InputInterface $input
@param OutputInterface $output | [
"Prints",
"configuration",
"for",
"the"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/DescribeCommand.php#L67-L92 |
TYPO3/Surf | src/Command/DescribeCommand.php | DescribeCommand.printApplications | protected function printApplications(array $applications, Workflow $workflow)
{
$this->output->writeln(PHP_EOL . 'Applications:' . PHP_EOL);
foreach ($applications as $application) {
$this->output->writeln(' <success>' . $application->getName() . ':</success>');
$this->outpu... | php | protected function printApplications(array $applications, Workflow $workflow)
{
$this->output->writeln(PHP_EOL . 'Applications:' . PHP_EOL);
foreach ($applications as $application) {
$this->output->writeln(' <success>' . $application->getName() . ':</success>');
$this->outpu... | [
"protected",
"function",
"printApplications",
"(",
"array",
"$",
"applications",
",",
"Workflow",
"$",
"workflow",
")",
"{",
"$",
"this",
"->",
"output",
"->",
"writeln",
"(",
"PHP_EOL",
".",
"'Applications:'",
".",
"PHP_EOL",
")",
";",
"foreach",
"(",
"$",
... | Prints configuration for each defined application
@param array $applications
@param Workflow $workflow | [
"Prints",
"configuration",
"for",
"each",
"defined",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/DescribeCommand.php#L111-L140 |
TYPO3/Surf | src/Command/DescribeCommand.php | DescribeCommand.printStages | protected function printStages(Application $application, array $stages, array $tasks)
{
foreach ($stages as $stage) {
$this->output->writeln(' <comment>' . $stage . ':</comment>');
foreach (['before', 'tasks', 'after'] as $stageStep) {
$output = '';
... | php | protected function printStages(Application $application, array $stages, array $tasks)
{
foreach ($stages as $stage) {
$this->output->writeln(' <comment>' . $stage . ':</comment>');
foreach (['before', 'tasks', 'after'] as $stageStep) {
$output = '';
... | [
"protected",
"function",
"printStages",
"(",
"Application",
"$",
"application",
",",
"array",
"$",
"stages",
",",
"array",
"$",
"tasks",
")",
"{",
"foreach",
"(",
"$",
"stages",
"as",
"$",
"stage",
")",
"{",
"$",
"this",
"->",
"output",
"->",
"writeln",
... | Prints stages and contained tasks for given application
@param Application $application
@param array $stages
@param array $tasks | [
"Prints",
"stages",
"and",
"contained",
"tasks",
"for",
"given",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/DescribeCommand.php#L149-L172 |
TYPO3/Surf | src/Command/DescribeCommand.php | DescribeCommand.printBeforeAfterTasks | private function printBeforeAfterTasks(array $tasks, $applicationName, $task, $step, &$output)
{
$label = $applicationName === '_' ? 'for all applications' : 'for application ' . $applicationName;
if (isset($tasks[$step][$applicationName][$task])) {
// 'Task "' . $beforeTask . '" before ... | php | private function printBeforeAfterTasks(array $tasks, $applicationName, $task, $step, &$output)
{
$label = $applicationName === '_' ? 'for all applications' : 'for application ' . $applicationName;
if (isset($tasks[$step][$applicationName][$task])) {
// 'Task "' . $beforeTask . '" before ... | [
"private",
"function",
"printBeforeAfterTasks",
"(",
"array",
"$",
"tasks",
",",
"$",
"applicationName",
",",
"$",
"task",
",",
"$",
"step",
",",
"&",
"$",
"output",
")",
"{",
"$",
"label",
"=",
"$",
"applicationName",
"===",
"'_'",
"?",
"'for all applicat... | Print all tasks before or after a task
@param array $tasks
@param string $applicationName
@param string $task
@param string $step
@param string $output | [
"Print",
"all",
"tasks",
"before",
"or",
"after",
"a",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/DescribeCommand.php#L183-L192 |
TYPO3/Surf | src/Task/TYPO3/CMS/RunCommandTask.php | RunCommandTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
$options = $this->configureOptions($options);
$arguments = array_merge([$this->getConsoleScriptFileName($node, $application, $deplo... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->ensureApplicationIsTypo3Cms($application);
$options = $this->configureOptions($options);
$arguments = array_merge([$this->getConsoleScriptFileName($node, $application, $deplo... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"ensureApplicationIsTypo3Cms",
"(",
"$",
"app... | Execute this task
@param \TYPO3\Surf\Domain\Model\Node $node
@param CMS|\TYPO3\Surf\Domain\Model\Application $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param array $options
@throws InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/RunCommandTask.php#L36-L51 |
TYPO3/Surf | src/Task/Neos/Flow/CopyConfigurationTask.php | CopyConfigurationTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$configurationFileExtension = isset($options['configurationFileExtension']) ? $options['configurationFileExtension'] : 'yaml';
$targetReleasePath = $deployment->getApplicationReleasePath($app... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$configurationFileExtension = isset($options['configurationFileExtension']) ? $options['configurationFileExtension'] : 'yaml';
$targetReleasePath = $deployment->getApplicationReleasePath($app... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"configurationFileExtension",
"=",
"isset",
"(",
"$",
"opti... | Executes this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options
@throws TaskExecutionException
@throws InvalidConfigurationException | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/CopyConfigurationTask.php#L50-L95 |
TYPO3/Surf | src/Task/Release/AddDownloadTask.php | AddDownloadTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->checkOptionsForValidity($options);
$host = $options['releaseHost'];
$login = $options['releaseHostLogin'];
$sitePath = $options['releaseHostSitePath'];
$versio... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->checkOptionsForValidity($options);
$host = $options['releaseHost'];
$login = $options['releaseHostLogin'];
$sitePath = $options['releaseHostSitePath'];
$versio... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"checkOptionsForValidity",
"(",
"$",
"options... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Release/AddDownloadTask.php#L34-L51 |
TYPO3/Surf | src/Task/Git/PushTask.php | PushTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['remote'])) {
throw new InvalidConfigurationException('Missing "remote" option for PushTask', 1314186541);
}
if (!isset($options['refspec'])) {
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['remote'])) {
throw new InvalidConfigurationException('Missing "remote" option for PushTask', 1314186541);
}
if (!isset($options['refspec'])) {
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'remote'... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Git/PushTask.php#L50-L66 |
TYPO3/Surf | src/Command/SimulateCommand.php | SimulateCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$deployment = $this->factory->getDeployment($deploymentName, $configurationPath, true, true, $inp... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$deployment = $this->factory->getDeployment($deploymentName, $configurationPath, true, true, $inp... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"configurationPath",
"=",
"$",
"input",
"->",
"getOption",
"(",
"'configurationPath'",
")",
";",
"$",
"deploymentName",
"=",
"$",
"in... | Execute
@param InputInterface $input
@param OutputInterface $output
@return int | [
"Execute"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/SimulateCommand.php#L61-L69 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.initialize | public function initialize()
{
if ($this->initialized) {
throw new SurfException('Already initialized', 1335976472);
}
if ($this->workflow === null) {
$this->workflow = new SimpleWorkflow();
}
foreach ($this->applications as $application) {
... | php | public function initialize()
{
if ($this->initialized) {
throw new SurfException('Already initialized', 1335976472);
}
if ($this->workflow === null) {
$this->workflow = new SimpleWorkflow();
}
foreach ($this->applications as $application) {
... | [
"public",
"function",
"initialize",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"initialized",
")",
"{",
"throw",
"new",
"SurfException",
"(",
"'Already initialized'",
",",
"1335976472",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"workflow",
"===",
"n... | Initialize the deployment
Must be called before calling deploy() on a deployment.
A time-based release identifier will be created on initialization. It also executes
callbacks given to the deployment with onInitialize(...).
@throws SurfException | [
"Initialize",
"the",
"deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L143-L160 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.deploy | public function deploy()
{
$this->logger->notice('Deploying ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->workflow->run($this);
} | php | public function deploy()
{
$this->logger->notice('Deploying ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->workflow->run($this);
} | [
"public",
"function",
"deploy",
"(",
")",
"{",
"$",
"this",
"->",
"logger",
"->",
"notice",
"(",
"'Deploying '",
".",
"$",
"this",
"->",
"name",
".",
"' ('",
".",
"$",
"this",
"->",
"releaseIdentifier",
".",
"')'",
")",
";",
"$",
"this",
"->",
"workf... | Run this deployment
@throws SurfException | [
"Run",
"this",
"deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L181-L185 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.simulate | public function simulate()
{
$this->setDryRun(true);
$this->logger->notice('Simulating ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->workflow->run($this);
} | php | public function simulate()
{
$this->setDryRun(true);
$this->logger->notice('Simulating ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->workflow->run($this);
} | [
"public",
"function",
"simulate",
"(",
")",
"{",
"$",
"this",
"->",
"setDryRun",
"(",
"true",
")",
";",
"$",
"this",
"->",
"logger",
"->",
"notice",
"(",
"'Simulating '",
".",
"$",
"this",
"->",
"name",
".",
"' ('",
".",
"$",
"this",
"->",
"releaseId... | Simulate this deployment without executing tasks
It will set dryRun = TRUE which can be inspected by any task. | [
"Simulate",
"this",
"deployment",
"without",
"executing",
"tasks"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L192-L197 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.getNodes | public function getNodes()
{
$nodes = [];
foreach ($this->applications as $application) {
foreach ($application->getNodes() as $node) {
$nodes[$node->getName()] = $node;
}
}
return $nodes;
} | php | public function getNodes()
{
$nodes = [];
foreach ($this->applications as $application) {
foreach ($application->getNodes() as $node) {
$nodes[$node->getName()] = $node;
}
}
return $nodes;
} | [
"public",
"function",
"getNodes",
"(",
")",
"{",
"$",
"nodes",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"applications",
"as",
"$",
"application",
")",
"{",
"foreach",
"(",
"$",
"application",
"->",
"getNodes",
"(",
")",
"as",
"$",
"node... | Get all nodes of this deployment
@return Node[] The deployment nodes with all application nodes | [
"Get",
"all",
"nodes",
"of",
"this",
"deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L238-L248 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.getNode | public function getNode($name)
{
if ($name === 'localhost') {
$node = new Node('localhost');
$node->onLocalhost();
return $node;
}
$nodes = $this->getNodes();
return isset($nodes[$name]) ? $nodes[$name] : null;
} | php | public function getNode($name)
{
if ($name === 'localhost') {
$node = new Node('localhost');
$node->onLocalhost();
return $node;
}
$nodes = $this->getNodes();
return isset($nodes[$name]) ? $nodes[$name] : null;
} | [
"public",
"function",
"getNode",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"$",
"name",
"===",
"'localhost'",
")",
"{",
"$",
"node",
"=",
"new",
"Node",
"(",
"'localhost'",
")",
";",
"$",
"node",
"->",
"onLocalhost",
"(",
")",
";",
"return",
"$",
"nod... | Get a node by name
In the special case "localhost" an ad-hoc Node with hostname "localhost" is returned.
@return \TYPO3\Surf\Domain\Model\Node The Node or NULL if no Node with the given name was found | [
"Get",
"a",
"node",
"by",
"name"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L257-L267 |
TYPO3/Surf | src/Domain/Model/Deployment.php | Deployment.rollback | public function rollback($dryRun = false)
{
$this->logger->notice('Rollback deployment ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->setWorkflow(new RollbackWorkflow());
$this->initialize();
if ($dryRun) {
$this->setDryRun(true);
}
$thi... | php | public function rollback($dryRun = false)
{
$this->logger->notice('Rollback deployment ' . $this->name . ' (' . $this->releaseIdentifier . ')');
$this->setWorkflow(new RollbackWorkflow());
$this->initialize();
if ($dryRun) {
$this->setDryRun(true);
}
$thi... | [
"public",
"function",
"rollback",
"(",
"$",
"dryRun",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"logger",
"->",
"notice",
"(",
"'Rollback deployment '",
".",
"$",
"this",
"->",
"name",
".",
"' ('",
".",
"$",
"this",
"->",
"releaseIdentifier",
".",
"')'"... | Rollback a deployment
@param bool $dryRun
@throws SurfException
@throws SurfException\InvalidConfigurationException | [
"Rollback",
"a",
"deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Deployment.php#L541-L551 |
TYPO3/Surf | src/Integration/Factory.php | Factory.createOutput | public function createOutput()
{
if ($this->output === null) {
$this->output = new ConsoleOutput();
$this->output->getFormatter()->setStyle('b', new OutputFormatterStyle(null, null, ['bold']));
$this->output->getFormatter()->setStyle('i', new OutputFormatterStyle('black',... | php | public function createOutput()
{
if ($this->output === null) {
$this->output = new ConsoleOutput();
$this->output->getFormatter()->setStyle('b', new OutputFormatterStyle(null, null, ['bold']));
$this->output->getFormatter()->setStyle('i', new OutputFormatterStyle('black',... | [
"public",
"function",
"createOutput",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"output",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"output",
"=",
"new",
"ConsoleOutput",
"(",
")",
";",
"$",
"this",
"->",
"output",
"->",
"getFormatter",
"(",
")"... | Create the output
@return ConsoleOutput | [
"Create",
"the",
"output"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L72-L89 |
TYPO3/Surf | src/Integration/Factory.php | Factory.getDeployment | public function getDeployment($deploymentName, $configurationPath = null, $simulateDeployment = true, $initialize = true, $forceDeployment = false)
{
$deployment = $this->createDeployment($deploymentName, $configurationPath);
if ($deployment->getLogger() === null) {
$logger = $this->crea... | php | public function getDeployment($deploymentName, $configurationPath = null, $simulateDeployment = true, $initialize = true, $forceDeployment = false)
{
$deployment = $this->createDeployment($deploymentName, $configurationPath);
if ($deployment->getLogger() === null) {
$logger = $this->crea... | [
"public",
"function",
"getDeployment",
"(",
"$",
"deploymentName",
",",
"$",
"configurationPath",
"=",
"null",
",",
"$",
"simulateDeployment",
"=",
"true",
",",
"$",
"initialize",
"=",
"true",
",",
"$",
"forceDeployment",
"=",
"false",
")",
"{",
"$",
"deploy... | Get the deployment object
@param string $deploymentName
@param string $configurationPath
@param bool $simulateDeployment
@param bool $initialize
@param bool $forceDeployment
@return Deployment
@throws InvalidConfigurationException
@throws \TYPO3\Surf\Exception | [
"Get",
"the",
"deployment",
"object"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L104-L125 |
TYPO3/Surf | src/Integration/Factory.php | Factory.getDeploymentNames | public function getDeploymentNames($path = null)
{
$path = $this->getDeploymentsBasePath($path);
$files = glob(Files::concatenatePaths([$path, '*.php']));
return array_map(function ($file) use ($path) {
return substr($file, strlen($path) + 1, -4);
}, $files);
} | php | public function getDeploymentNames($path = null)
{
$path = $this->getDeploymentsBasePath($path);
$files = glob(Files::concatenatePaths([$path, '*.php']));
return array_map(function ($file) use ($path) {
return substr($file, strlen($path) + 1, -4);
}, $files);
} | [
"public",
"function",
"getDeploymentNames",
"(",
"$",
"path",
"=",
"null",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"getDeploymentsBasePath",
"(",
"$",
"path",
")",
";",
"$",
"files",
"=",
"glob",
"(",
"Files",
"::",
"concatenatePaths",
"(",
"[",
... | Get available deployment names
Will look up all .php files in the directory ./.surf/ or the given path if specified.
@param string $path
@return array | [
"Get",
"available",
"deployment",
"names"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L136-L144 |
TYPO3/Surf | src/Integration/Factory.php | Factory.getDeploymentsBasePath | public function getDeploymentsBasePath($path = null)
{
$localDeploymentDescription = @realpath('./.surf');
if (! $path && is_dir($localDeploymentDescription)) {
$path = $localDeploymentDescription;
}
$path = $path ?: Files::concatenatePaths([$this->getHomeDir(), 'deployme... | php | public function getDeploymentsBasePath($path = null)
{
$localDeploymentDescription = @realpath('./.surf');
if (! $path && is_dir($localDeploymentDescription)) {
$path = $localDeploymentDescription;
}
$path = $path ?: Files::concatenatePaths([$this->getHomeDir(), 'deployme... | [
"public",
"function",
"getDeploymentsBasePath",
"(",
"$",
"path",
"=",
"null",
")",
"{",
"$",
"localDeploymentDescription",
"=",
"@",
"realpath",
"(",
"'./.surf'",
")",
";",
"if",
"(",
"!",
"$",
"path",
"&&",
"is_dir",
"(",
"$",
"localDeploymentDescription",
... | Get the root path of the surf deployment declarations
This defaults to ./.surf if a NULL path is given.
@param string $path An absolute path (optional)
@return string The configuration root path without a trailing slash.
@throws \RuntimeException
@throws InvalidConfigurationException | [
"Get",
"the",
"root",
"path",
"of",
"the",
"surf",
"deployment",
"declarations"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L157-L167 |
TYPO3/Surf | src/Integration/Factory.php | Factory.getWorkspacesBasePath | public function getWorkspacesBasePath($path = null)
{
$workspacesBasePath = getenv('SURF_WORKSPACE');
if (! $workspacesBasePath) {
$path = $path ?: $this->getHomeDir();
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
if ($workspacesBasePath = getenv('LOCALAPPDATA'... | php | public function getWorkspacesBasePath($path = null)
{
$workspacesBasePath = getenv('SURF_WORKSPACE');
if (! $workspacesBasePath) {
$path = $path ?: $this->getHomeDir();
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
if ($workspacesBasePath = getenv('LOCALAPPDATA'... | [
"public",
"function",
"getWorkspacesBasePath",
"(",
"$",
"path",
"=",
"null",
")",
"{",
"$",
"workspacesBasePath",
"=",
"getenv",
"(",
"'SURF_WORKSPACE'",
")",
";",
"if",
"(",
"!",
"$",
"workspacesBasePath",
")",
"{",
"$",
"path",
"=",
"$",
"path",
"?",
... | Get the base path to local workspaces
@param string $path An absolute path (optional)
@return string The workspaces base path without a trailing slash.
@throws \RuntimeException
@throws InvalidConfigurationException | [
"Get",
"the",
"base",
"path",
"to",
"local",
"workspaces"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L178-L196 |
TYPO3/Surf | src/Integration/Factory.php | Factory.createDeployment | protected function createDeployment($deploymentName, $path = null)
{
$deploymentConfigurationPath = $this->getDeploymentsBasePath($path);
$workspacesBasePath = $this->getWorkspacesBasePath();
if (empty($deploymentName)) {
$deploymentNames = $this->getDeploymentNames($path);
... | php | protected function createDeployment($deploymentName, $path = null)
{
$deploymentConfigurationPath = $this->getDeploymentsBasePath($path);
$workspacesBasePath = $this->getWorkspacesBasePath();
if (empty($deploymentName)) {
$deploymentNames = $this->getDeploymentNames($path);
... | [
"protected",
"function",
"createDeployment",
"(",
"$",
"deploymentName",
",",
"$",
"path",
"=",
"null",
")",
"{",
"$",
"deploymentConfigurationPath",
"=",
"$",
"this",
"->",
"getDeploymentsBasePath",
"(",
"$",
"path",
")",
";",
"$",
"workspacesBasePath",
"=",
... | Get a deployment object by deployment name
Looks up the deployment in directory ./.surf/[deploymentName].php
The script has access to a deployment object as "$deployment". This could change
in the future.
@param string $deploymentName
@param string $path
@return Deployment
@throws \RuntimeException
@throws InvalidC... | [
"Get",
"a",
"deployment",
"object",
"by",
"deployment",
"name"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L213-L241 |
TYPO3/Surf | src/Integration/Factory.php | Factory.getHomeDir | protected function getHomeDir()
{
$home = getenv('SURF_HOME');
if (! $home) {
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
if (! getenv('APPDATA')) {
throw new \RuntimeException('The APPDATA or SURF_HOME environment variable must be set for composer to ... | php | protected function getHomeDir()
{
$home = getenv('SURF_HOME');
if (! $home) {
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
if (! getenv('APPDATA')) {
throw new \RuntimeException('The APPDATA or SURF_HOME environment variable must be set for composer to ... | [
"protected",
"function",
"getHomeDir",
"(",
")",
"{",
"$",
"home",
"=",
"getenv",
"(",
"'SURF_HOME'",
")",
";",
"if",
"(",
"!",
"$",
"home",
")",
"{",
"if",
"(",
"defined",
"(",
"'PHP_WINDOWS_VERSION_MAJOR'",
")",
")",
"{",
"if",
"(",
"!",
"getenv",
... | Get the home directory
@return string
@throws \RuntimeException
@throws InvalidConfigurationException | [
"Get",
"the",
"home",
"directory"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L250-L269 |
TYPO3/Surf | src/Integration/Factory.php | Factory.createLogger | protected function createLogger()
{
if ($this->logger === null) {
$consoleHandler = new ConsoleHandler($this->createOutput());
$this->logger = new Logger('TYPO3 Surf', [$consoleHandler]);
}
return $this->logger;
} | php | protected function createLogger()
{
if ($this->logger === null) {
$consoleHandler = new ConsoleHandler($this->createOutput());
$this->logger = new Logger('TYPO3 Surf', [$consoleHandler]);
}
return $this->logger;
} | [
"protected",
"function",
"createLogger",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"logger",
"===",
"null",
")",
"{",
"$",
"consoleHandler",
"=",
"new",
"ConsoleHandler",
"(",
"$",
"this",
"->",
"createOutput",
"(",
")",
")",
";",
"$",
"this",
"->",... | Create a logger instance
@return Logger | [
"Create",
"a",
"logger",
"instance"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L276-L284 |
TYPO3/Surf | src/Integration/Factory.php | Factory.ensureDirectoryExists | protected function ensureDirectoryExists($dir)
{
if (! file_exists($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
throw new InvalidConfigurationException(sprintf('Directory "%s" cannot be created!', $dir), 1451862775);
}
} | php | protected function ensureDirectoryExists($dir)
{
if (! file_exists($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
throw new InvalidConfigurationException(sprintf('Directory "%s" cannot be created!', $dir), 1451862775);
}
} | [
"protected",
"function",
"ensureDirectoryExists",
"(",
"$",
"dir",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"dir",
")",
"&&",
"!",
"@",
"mkdir",
"(",
"$",
"dir",
",",
"0777",
",",
"true",
")",
"&&",
"!",
"is_dir",
"(",
"$",
"dir",
")",
... | Check that the directory exists
@param string $dir
@throws InvalidConfigurationException | [
"Check",
"that",
"the",
"directory",
"exists"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Integration/Factory.php#L293-L298 |
TYPO3/Surf | src/Application/BaseApplication.php | BaseApplication.registerTasks | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
$this->setOption(GenericCreateDirectoriesTask::class . '[directories]', $this->getDirectories());
$this->setOption(CreateSymlinksTask::class . '[symlinks]', $this->getSymlinks());
if ($this->hasOption('packageMethod... | php | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
$this->setOption(GenericCreateDirectoriesTask::class . '[directories]', $this->getDirectories());
$this->setOption(CreateSymlinksTask::class . '[symlinks]', $this->getSymlinks());
if ($this->hasOption('packageMethod... | [
"public",
"function",
"registerTasks",
"(",
"Workflow",
"$",
"workflow",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"$",
"this",
"->",
"setOption",
"(",
"GenericCreateDirectoriesTask",
"::",
"class",
".",
"'[directories]'",
",",
"$",
"this",
"->",
"getDirec... | Register tasks for the base application
The base application performs the following tasks:
Initialize stage:
- Create directories for release structure
Update stage:
- Perform Git checkout (and pass on sha1 / tag or branch option from application to the task)
Switch stage:
- Symlink the current and previous release... | [
"Register",
"tasks",
"for",
"the",
"base",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/BaseApplication.php#L94-L129 |
TYPO3/Surf | src/Application/BaseApplication.php | BaseApplication.addSymlinks | public function addSymlinks(array $symlinks)
{
foreach ($symlinks as $linkPath => $sourcePath) {
$this->addSymlink($linkPath, $sourcePath);
}
return $this;
} | php | public function addSymlinks(array $symlinks)
{
foreach ($symlinks as $linkPath => $sourcePath) {
$this->addSymlink($linkPath, $sourcePath);
}
return $this;
} | [
"public",
"function",
"addSymlinks",
"(",
"array",
"$",
"symlinks",
")",
"{",
"foreach",
"(",
"$",
"symlinks",
"as",
"$",
"linkPath",
"=>",
"$",
"sourcePath",
")",
"{",
"$",
"this",
"->",
"addSymlink",
"(",
"$",
"linkPath",
",",
"$",
"sourcePath",
")",
... | Register an array of additional symlinks to be created for the application
@param array $symlinks
@return \TYPO3\Surf\Application\BaseApplication
@see setSymlinks() | [
"Register",
"an",
"array",
"of",
"additional",
"symlinks",
"to",
"be",
"created",
"for",
"the",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/BaseApplication.php#L179-L186 |
TYPO3/Surf | src/Command/ReleaseCommand.php | ReleaseCommand.executeProcess | public function executeProcess($command)
{
$process = new Process($command);
$process->setTimeout(null);
$output = $this->output;
$callback = function ($type, $data) use ($output) {
$output->writeln(trim($data));
};
$exitCode = $process->run($callback);
... | php | public function executeProcess($command)
{
$process = new Process($command);
$process->setTimeout(null);
$output = $this->output;
$callback = function ($type, $data) use ($output) {
$output->writeln(trim($data));
};
$exitCode = $process->run($callback);
... | [
"public",
"function",
"executeProcess",
"(",
"$",
"command",
")",
"{",
"$",
"process",
"=",
"new",
"Process",
"(",
"$",
"command",
")",
";",
"$",
"process",
"->",
"setTimeout",
"(",
"null",
")",
";",
"$",
"output",
"=",
"$",
"this",
"->",
"output",
"... | Open a process with symfony/process and process each line by logging and
collecting its output.
@param string $command
@return array The exit code of the command and the returned output | [
"Open",
"a",
"process",
"with",
"symfony",
"/",
"process",
"and",
"process",
"each",
"line",
"by",
"logging",
"and",
"collecting",
"its",
"output",
"."
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/ReleaseCommand.php#L61-L71 |
TYPO3/Surf | src/Task/Neos/Flow/FlushCacheListTask.php | FlushCacheListTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, FlowApplication::class, sprintf('Flow application needed for MigrateTask, got "%s"', get_class($application)));
Assert::greaterThanEq($application->getVersi... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, FlowApplication::class, sprintf('Flow application needed for MigrateTask, got "%s"', get_class($application)));
Assert::greaterThanEq($application->getVersi... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"Assert",
"::",
"isInstanceOf",
"(",
"$",
"application",
",",
... | Execute this task
@param Node $node
@param Application|FlowApplication $application
@param Deployment $deployment
@param array $options
@throws InvalidArgumentException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/FlushCacheListTask.php#L56-L72 |
TYPO3/Surf | src/Task/GitCheckoutTask.php | GitCheckoutTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['repositoryUrl'])) {
throw new InvalidConfigurationException(sprintf('Missing "repositoryUrl" option for application "%s"', $application->getName()), 1335974764);
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['repositoryUrl'])) {
throw new InvalidConfigurationException(sprintf('Missing "repositoryUrl" option for application "%s"', $application->getName()), 1335974764);
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'reposit... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException
@throws \TYPO3\Surf\Exception\TaskExecutionException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/GitCheckoutTask.php#L41-L64 |
TYPO3/Surf | src/Application/Neos/FlowDistribution.php | FlowDistribution.registerTasks | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
parent::registerTasks($workflow, $deployment);
$this->checkIfMandatoryOptionsExist();
$this->buildConfiguration();
$this->defineTasks($workflow, $deployment);
if ($this->getOption('enableTests') !==... | php | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
parent::registerTasks($workflow, $deployment);
$this->checkIfMandatoryOptionsExist();
$this->buildConfiguration();
$this->defineTasks($workflow, $deployment);
if ($this->getOption('enableTests') !==... | [
"public",
"function",
"registerTasks",
"(",
"Workflow",
"$",
"workflow",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"parent",
"::",
"registerTasks",
"(",
"$",
"workflow",
",",
"$",
"deployment",
")",
";",
"$",
"this",
"->",
"checkIfMandatoryOptionsExist",
... | Register tasks for this application
@param Workflow $workflow
@param Deployment $deployment | [
"Register",
"tasks",
"for",
"this",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/Neos/FlowDistribution.php#L50-L90 |
TYPO3/Surf | src/Application/Neos/FlowDistribution.php | FlowDistribution.checkIfMandatoryOptionsExist | protected function checkIfMandatoryOptionsExist()
{
if (!$this->hasOption('version')) {
throw new InvalidConfigurationException('"version" option needs to be defined. Example: 1.0.0-beta2', 1314187396);
}
if (!$this->hasOption('projectName')) {
throw new InvalidConfig... | php | protected function checkIfMandatoryOptionsExist()
{
if (!$this->hasOption('version')) {
throw new InvalidConfigurationException('"version" option needs to be defined. Example: 1.0.0-beta2', 1314187396);
}
if (!$this->hasOption('projectName')) {
throw new InvalidConfig... | [
"protected",
"function",
"checkIfMandatoryOptionsExist",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasOption",
"(",
"'version'",
")",
")",
"{",
"throw",
"new",
"InvalidConfigurationException",
"(",
"'\"version\" option needs to be defined. Example: 1.0.0-beta2'",... | Check if all necessary options to run are set
@throws InvalidConfigurationException | [
"Check",
"if",
"all",
"necessary",
"options",
"to",
"run",
"are",
"set"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/Neos/FlowDistribution.php#L97-L131 |
TYPO3/Surf | src/Application/Neos/FlowDistribution.php | FlowDistribution.buildConfiguration | protected function buildConfiguration()
{
$versionAndProjectName = sprintf('%s-%s', str_replace(' ', '_', $this->getOption('projectName')), $this->getOption('version'));
$this->configuration['versionAndProjectName'] = $versionAndProjectName;
$this->configuration['zipFile'] = $this->getDeplo... | php | protected function buildConfiguration()
{
$versionAndProjectName = sprintf('%s-%s', str_replace(' ', '_', $this->getOption('projectName')), $this->getOption('version'));
$this->configuration['versionAndProjectName'] = $versionAndProjectName;
$this->configuration['zipFile'] = $this->getDeplo... | [
"protected",
"function",
"buildConfiguration",
"(",
")",
"{",
"$",
"versionAndProjectName",
"=",
"sprintf",
"(",
"'%s-%s'",
",",
"str_replace",
"(",
"' '",
",",
"'_'",
",",
"$",
"this",
"->",
"getOption",
"(",
"'projectName'",
")",
")",
",",
"$",
"this",
"... | Build configuration which we need later into $this->configuration | [
"Build",
"configuration",
"which",
"we",
"need",
"later",
"into",
"$this",
"-",
">",
"configuration"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/Neos/FlowDistribution.php#L136-L144 |
TYPO3/Surf | src/Application/Neos/FlowDistribution.php | FlowDistribution.defineTasks | protected function defineTasks(Workflow $workflow, Deployment $deployment)
{
$excludePatterns = [
'.git*',
'Data/*',
'Web/_Resources/*',
'Build/Reports',
'./Cache',
'Configuration/PackageStates.php'
];
$baseArchiveConfi... | php | protected function defineTasks(Workflow $workflow, Deployment $deployment)
{
$excludePatterns = [
'.git*',
'Data/*',
'Web/_Resources/*',
'Build/Reports',
'./Cache',
'Configuration/PackageStates.php'
];
$baseArchiveConfi... | [
"protected",
"function",
"defineTasks",
"(",
"Workflow",
"$",
"workflow",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"$",
"excludePatterns",
"=",
"[",
"'.git*'",
",",
"'Data/*'",
",",
"'Web/_Resources/*'",
",",
"'Build/Reports'",
",",
"'./Cache'",
",",
"'Co... | Configure tasks
@param Workflow $workflow
@param Deployment $deployment | [
"Configure",
"tasks"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/Neos/FlowDistribution.php#L152-L241 |
TYPO3/Surf | src/Task/SourceforgeUploadTask.php | SourceforgeUploadTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$deployment->getLogger()->warning(DeprecationMessageFactory::createGenericDeprecationWarningForTask(__CLASS__));
$options = $this->configureOptions($options);
$projectName = $options[... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$deployment->getLogger()->warning(DeprecationMessageFactory::createGenericDeprecationWarningForTask(__CLASS__));
$options = $this->configureOptions($options);
$projectName = $options[... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"deployment",
"->",
"getLogger",
"(",
")",
"->",
"warning... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/SourceforgeUploadTask.php#L60-L72 |
TYPO3/Surf | src/Task/CleanupReleasesTask.php | CleanupReleasesTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (! isset($options['keepReleases'])) {
$deployment->getLogger()->debug(($deployment->isDryRun() ? 'Would keep' : 'Keeping') . ' all releases for "' . $application->getName() . '"');
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (! isset($options['keepReleases'])) {
$deployment->getLogger()->debug(($deployment->isDryRun() ? 'Would keep' : 'Keeping') . ' all releases for "' . $application->getName() . '"');
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'keepRel... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/CleanupReleasesTask.php#L50-L82 |
TYPO3/Surf | src/Task/ShellTask.php | ShellTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['command'])) {
throw new InvalidConfigurationException('Missing "command" option for ShellTask', 1311168045);
}
$replacePaths = [
'{deploy... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['command'])) {
throw new InvalidConfigurationException('Missing "command" option for ShellTask', 1311168045);
}
$replacePaths = [
'{deploy... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'command... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/ShellTask.php#L50-L71 |
TYPO3/Surf | src/Task/ShellTask.php | ShellTask.rollback | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['rollbackCommand'])) {
return;
}
$replacePaths = [
'{deploymentPath}' => $application->getDeploymentPath(),
'{sharedPath}' =>... | php | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['rollbackCommand'])) {
return;
}
$replacePaths = [
'{deploymentPath}' => $application->getDeploymentPath(),
'{sharedPath}' =>... | [
"public",
"function",
"rollback",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'rollba... | Rollback 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 | [
"Rollback",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/ShellTask.php#L94-L112 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.execute | public function execute($command, Node $node, Deployment $deployment, $ignoreErrors = false, $logOutput = true)
{
if ($node->isLocalhost()) {
list($exitCode, $returnedOutput) = $this->executeLocalCommand($command, $deployment, $logOutput);
} else {
list($exitCode, $returnedOu... | php | public function execute($command, Node $node, Deployment $deployment, $ignoreErrors = false, $logOutput = true)
{
if ($node->isLocalhost()) {
list($exitCode, $returnedOutput) = $this->executeLocalCommand($command, $deployment, $logOutput);
} else {
list($exitCode, $returnedOu... | [
"public",
"function",
"execute",
"(",
"$",
"command",
",",
"Node",
"$",
"node",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"ignoreErrors",
"=",
"false",
",",
"$",
"logOutput",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"node",
"->",
"isLocalhost",
"("... | Execute a shell command (locally or remote depending on the node hostname)
@param array|string $command The shell command to execute, either string or array of commands
@param Node $node Node to execute command against
@param Deployment $deployment
@param bool $ignoreErrors If this command should ignore exit codes une... | [
"Execute",
"a",
"shell",
"command",
"(",
"locally",
"or",
"remote",
"depending",
"on",
"the",
"node",
"hostname",
")"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L33-L45 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.simulate | public function simulate($command, Node $node, Deployment $deployment)
{
if ($node->isLocalhost()) {
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('... (localhost): "' . $command . '"');
} else {
$command = $this->prepareCommand($comm... | php | public function simulate($command, Node $node, Deployment $deployment)
{
if ($node->isLocalhost()) {
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('... (localhost): "' . $command . '"');
} else {
$command = $this->prepareCommand($comm... | [
"public",
"function",
"simulate",
"(",
"$",
"command",
",",
"Node",
"$",
"node",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"if",
"(",
"$",
"node",
"->",
"isLocalhost",
"(",
")",
")",
"{",
"$",
"command",
"=",
"$",
"this",
"->",
"prepareCommand",
... | Simulate a command by just outputting what would be executed
@param array|string $command
@param Node|null $node
@param Deployment $deployment
@return bool
@throws TaskExecutionException | [
"Simulate",
"a",
"command",
"by",
"just",
"outputting",
"what",
"would",
"be",
"executed"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L56-L66 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.executeOrSimulate | public function executeOrSimulate($command, Node $node, Deployment $deployment, $ignoreErrors = false, $logOutput = true)
{
if (!$deployment->isDryRun()) {
return $this->execute($command, $node, $deployment, $ignoreErrors, $logOutput);
}
return $this->simulate($command, $node, $d... | php | public function executeOrSimulate($command, Node $node, Deployment $deployment, $ignoreErrors = false, $logOutput = true)
{
if (!$deployment->isDryRun()) {
return $this->execute($command, $node, $deployment, $ignoreErrors, $logOutput);
}
return $this->simulate($command, $node, $d... | [
"public",
"function",
"executeOrSimulate",
"(",
"$",
"command",
",",
"Node",
"$",
"node",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"ignoreErrors",
"=",
"false",
",",
"$",
"logOutput",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"$",
"deployment",
"->",... | Execute or simulate a command (if the deployment is in dry run mode)
@param array|string $command
@param Node $node
@param Deployment $deployment
@param bool $ignoreErrors
@param bool $logOutput true if the output of the command should be logged
@return mixed false if command failed or command output as string
@throws... | [
"Execute",
"or",
"simulate",
"a",
"command",
"(",
"if",
"the",
"deployment",
"is",
"in",
"dry",
"run",
"mode",
")"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L79-L85 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.executeLocalCommand | protected function executeLocalCommand($command, Deployment $deployment, $logOutput = true)
{
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('(localhost): "' . $command . '"');
return $this->executeProcess($deployment, $command, $logOutput, '> ');
} | php | protected function executeLocalCommand($command, Deployment $deployment, $logOutput = true)
{
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('(localhost): "' . $command . '"');
return $this->executeProcess($deployment, $command, $logOutput, '> ');
} | [
"protected",
"function",
"executeLocalCommand",
"(",
"$",
"command",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"logOutput",
"=",
"true",
")",
"{",
"$",
"command",
"=",
"$",
"this",
"->",
"prepareCommand",
"(",
"$",
"command",
")",
";",
"$",
"deployme... | Execute a shell command locally
@param array|string $command
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param bool $logOutput TRUE if the output of the command should be logged
@return array
@throws TaskExecutionException | [
"Execute",
"a",
"shell",
"command",
"locally"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L96-L102 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.executeRemoteCommand | protected function executeRemoteCommand($command, Node $node, Deployment $deployment, $logOutput = true)
{
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('$' . $node->getName() . ': "' . $command . '"');
if ($node->hasOption('remoteCommandExecutionHandler')) {
... | php | protected function executeRemoteCommand($command, Node $node, Deployment $deployment, $logOutput = true)
{
$command = $this->prepareCommand($command);
$deployment->getLogger()->debug('$' . $node->getName() . ': "' . $command . '"');
if ($node->hasOption('remoteCommandExecutionHandler')) {
... | [
"protected",
"function",
"executeRemoteCommand",
"(",
"$",
"command",
",",
"Node",
"$",
"node",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"logOutput",
"=",
"true",
")",
"{",
"$",
"command",
"=",
"$",
"this",
"->",
"prepareCommand",
"(",
"$",
"command... | Execute a shell command via SSH
@param array|string $command
@param \TYPO3\Surf\Domain\Model\Node $node
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param bool $logOutput TRUE if the output of the command should be logged
@return array
@throws TaskExecutionException | [
"Execute",
"a",
"shell",
"command",
"via",
"SSH"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L114-L159 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.executeProcess | public function executeProcess($deployment, $command, $logOutput, $logPrefix)
{
$process = new Process($command);
$process->setTimeout(null);
$callback = null;
if ($logOutput) {
$callback = function ($type, $data) use ($deployment, $logPrefix) {
if ($type ... | php | public function executeProcess($deployment, $command, $logOutput, $logPrefix)
{
$process = new Process($command);
$process->setTimeout(null);
$callback = null;
if ($logOutput) {
$callback = function ($type, $data) use ($deployment, $logPrefix) {
if ($type ... | [
"public",
"function",
"executeProcess",
"(",
"$",
"deployment",
",",
"$",
"command",
",",
"$",
"logOutput",
",",
"$",
"logPrefix",
")",
"{",
"$",
"process",
"=",
"new",
"Process",
"(",
"$",
"command",
")",
";",
"$",
"process",
"->",
"setTimeout",
"(",
... | Open a process with symfony/process and process each line by logging and
collecting its output.
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param string $command
@param bool $logOutput
@param string $logPrefix
@return array The exit code of the command and the returned output | [
"Open",
"a",
"process",
"with",
"symfony",
"/",
"process",
"and",
"process",
"each",
"line",
"by",
"logging",
"and",
"collecting",
"its",
"output",
"."
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L171-L187 |
TYPO3/Surf | src/Domain/Service/ShellCommandService.php | ShellCommandService.prepareCommand | protected function prepareCommand($command)
{
if (is_string($command)) {
return trim($command);
}
if (is_array($command)) {
return implode(' && ', $command);
}
throw new TaskExecutionException('Command must be string or array, ' . gettype($command) . '... | php | protected function prepareCommand($command)
{
if (is_string($command)) {
return trim($command);
}
if (is_array($command)) {
return implode(' && ', $command);
}
throw new TaskExecutionException('Command must be string or array, ' . gettype($command) . '... | [
"protected",
"function",
"prepareCommand",
"(",
"$",
"command",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"command",
")",
")",
"{",
"return",
"trim",
"(",
"$",
"command",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$",
"command",
")",
")",
"{",
"... | Prepare a command
@param array|string $command
@return string
@throws TaskExecutionException | [
"Prepare",
"a",
"command"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/ShellCommandService.php#L196-L205 |
TYPO3/Surf | src/Task/Generic/CreateDirectoriesTask.php | CreateDirectoriesTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
try {
$options = $this->configureOptions($options);
} catch (ExceptionInterface $e) {
return;
}
if (empty($options['directories'])) {
retu... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
try {
$options = $this->configureOptions($options);
} catch (ExceptionInterface $e) {
return;
}
if (empty($options['directories'])) {
retu... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"try",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configu... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Generic/CreateDirectoriesTask.php#L53-L74 |
TYPO3/Surf | src/Task/Generic/CreateDirectoriesTask.php | CreateDirectoriesTask.resolveOptions | protected function resolveOptions(OptionsResolver $resolver)
{
$resolver->setRequired('directories');
$resolver->setDefault('baseDirectory', null);
$resolver->setAllowedTypes('directories', 'array');
} | php | protected function resolveOptions(OptionsResolver $resolver)
{
$resolver->setRequired('directories');
$resolver->setDefault('baseDirectory', null);
$resolver->setAllowedTypes('directories', 'array');
} | [
"protected",
"function",
"resolveOptions",
"(",
"OptionsResolver",
"$",
"resolver",
")",
"{",
"$",
"resolver",
"->",
"setRequired",
"(",
"'directories'",
")",
";",
"$",
"resolver",
"->",
"setDefault",
"(",
"'baseDirectory'",
",",
"null",
")",
";",
"$",
"resolv... | @param OptionsResolver $resolver
@throws \Exception | [
"@param",
"OptionsResolver",
"$resolver"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Generic/CreateDirectoriesTask.php#L94-L99 |
TYPO3/Surf | src/Task/Package/GitTask.php | GitTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['repositoryUrl'])) {
throw new InvalidConfigurationException(sprintf('Missing "repositoryUrl" option for application "%s"', $application->getName()), 1374074052);
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['repositoryUrl'])) {
throw new InvalidConfigurationException(sprintf('Missing "repositoryUrl" option for application "%s"', $application->getName()), 1374074052);
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'reposit... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException
@throws \TYPO3\Surf\Exception\TaskExecutionException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Package/GitTask.php#L59-L72 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.removeTask | public function removeTask($removeTask, Application $application = null)
{
$removeApplicationName = $application instanceof Application ? $application->getName() : null;
$applicationRemovalGuardClause = function ($applicationName) use ($removeApplicationName) {
return null !== $removeAp... | php | public function removeTask($removeTask, Application $application = null)
{
$removeApplicationName = $application instanceof Application ? $application->getName() : null;
$applicationRemovalGuardClause = function ($applicationName) use ($removeApplicationName) {
return null !== $removeAp... | [
"public",
"function",
"removeTask",
"(",
"$",
"removeTask",
",",
"Application",
"$",
"application",
"=",
"null",
")",
"{",
"$",
"removeApplicationName",
"=",
"$",
"application",
"instanceof",
"Application",
"?",
"$",
"application",
"->",
"getName",
"(",
")",
"... | Remove the given task from all stages and applications
@param string $removeTask
@param \TYPO3\Surf\Domain\Model\Application $application if given, task is only removed from application
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Remove",
"the",
"given",
"task",
"from",
"all",
"stages",
"and",
"applications"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L66-L114 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.addTaskToStage | protected function addTaskToStage($tasks, $stage, Application $application = null, $step = 'tasks')
{
if (!is_array($tasks)) {
$tasks = [$tasks];
}
$applicationName = $application !== null ? $application->getName() : '_';
if (!isset($this->tasks['stage'][$applicationNam... | php | protected function addTaskToStage($tasks, $stage, Application $application = null, $step = 'tasks')
{
if (!is_array($tasks)) {
$tasks = [$tasks];
}
$applicationName = $application !== null ? $application->getName() : '_';
if (!isset($this->tasks['stage'][$applicationNam... | [
"protected",
"function",
"addTaskToStage",
"(",
"$",
"tasks",
",",
"$",
"stage",
",",
"Application",
"$",
"application",
"=",
"null",
",",
"$",
"step",
"=",
"'tasks'",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"tasks",
")",
")",
"{",
"$",
"task... | Add the given tasks to a step in a stage and optionally a specific application
The tasks will be executed for the given stage. If an application is given,
the tasks will be executed only for the stage and application.
@param array|string $tasks
@param string $stage The name of the stage when this task shall be execut... | [
"Add",
"the",
"given",
"tasks",
"to",
"a",
"step",
"in",
"a",
"stage",
"and",
"optionally",
"a",
"specific",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L137-L150 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.addTask | public function addTask($tasks, $stage, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application);
return $this;
} | php | public function addTask($tasks, $stage, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application);
return $this;
} | [
"public",
"function",
"addTask",
"(",
"$",
"tasks",
",",
"$",
"stage",
",",
"Application",
"$",
"application",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"addTaskToStage",
"(",
"$",
"tasks",
",",
"$",
"stage",
",",
"$",
"application",
")",
";",
"return"... | Add the given tasks for a stage and optionally a specific application
The tasks will be executed for the given stage. If an application is given,
the tasks will be executed only for the stage and application.
@param array|string $tasks
@param string $stage The name of the stage when this task shall be executed
@param... | [
"Add",
"the",
"given",
"tasks",
"for",
"a",
"stage",
"and",
"optionally",
"a",
"specific",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L164-L169 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.afterTask | public function afterTask($task, $tasks, Application $application = null)
{
if (!is_array($tasks)) {
$tasks = [$tasks];
}
$applicationName = $application !== null ? $application->getName() : '_';
if (!isset($this->tasks['after'][$applicationName][$task])) {
... | php | public function afterTask($task, $tasks, Application $application = null)
{
if (!is_array($tasks)) {
$tasks = [$tasks];
}
$applicationName = $application !== null ? $application->getName() : '_';
if (!isset($this->tasks['after'][$applicationName][$task])) {
... | [
"public",
"function",
"afterTask",
"(",
"$",
"task",
",",
"$",
"tasks",
",",
"Application",
"$",
"application",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"tasks",
")",
")",
"{",
"$",
"tasks",
"=",
"[",
"$",
"tasks",
"]",
";",
"... | Add tasks that shall be executed after the given task
The execution will not depend on a stage but on an optional application.
@param string $task
@param array|string $tasks
@param \TYPO3\Surf\Domain\Model\Application $application
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Add",
"tasks",
"that",
"shall",
"be",
"executed",
"after",
"the",
"given",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L182-L196 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.defineTask | public function defineTask($taskName, $baseTask, $options)
{
$this->tasks['defined'][$taskName] = [
'task' => $baseTask,
'options' => $options
];
return $this;
} | php | public function defineTask($taskName, $baseTask, $options)
{
$this->tasks['defined'][$taskName] = [
'task' => $baseTask,
'options' => $options
];
return $this;
} | [
"public",
"function",
"defineTask",
"(",
"$",
"taskName",
",",
"$",
"baseTask",
",",
"$",
"options",
")",
"{",
"$",
"this",
"->",
"tasks",
"[",
"'defined'",
"]",
"[",
"$",
"taskName",
"]",
"=",
"[",
"'task'",
"=>",
"$",
"baseTask",
",",
"'options'",
... | Define a new task based on an existing task by setting options
@param string $taskName
@param string $baseTask
@param array $options
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Define",
"a",
"new",
"task",
"based",
"on",
"an",
"existing",
"task",
"by",
"setting",
"options"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L234-L241 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.beforeStage | public function beforeStage($stage, $tasks, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application, 'before');
return $this;
} | php | public function beforeStage($stage, $tasks, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application, 'before');
return $this;
} | [
"public",
"function",
"beforeStage",
"(",
"$",
"stage",
",",
"$",
"tasks",
",",
"Application",
"$",
"application",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"addTaskToStage",
"(",
"$",
"tasks",
",",
"$",
"stage",
",",
"$",
"application",
",",
"'before'",... | Add tasks that shall be executed before the given stage
@param string $stage
@param array|string $tasks
@param \TYPO3\Surf\Domain\Model\Application $application
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Add",
"tasks",
"that",
"shall",
"be",
"executed",
"before",
"the",
"given",
"stage"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L252-L257 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.afterStage | public function afterStage($stage, $tasks, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application, 'after');
return $this;
} | php | public function afterStage($stage, $tasks, Application $application = null)
{
$this->addTaskToStage($tasks, $stage, $application, 'after');
return $this;
} | [
"public",
"function",
"afterStage",
"(",
"$",
"stage",
",",
"$",
"tasks",
",",
"Application",
"$",
"application",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"addTaskToStage",
"(",
"$",
"tasks",
",",
"$",
"stage",
",",
"$",
"application",
",",
"'after'",
... | Add tasks that shall be executed after the given stage
@param string $stage
@param array|string $tasks
@param \TYPO3\Surf\Domain\Model\Application $application
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Add",
"tasks",
"that",
"shall",
"be",
"executed",
"after",
"the",
"given",
"stage"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L268-L273 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.setTaskOptions | public function setTaskOptions($taskName, $options)
{
$baseTask = $taskName;
if (isset($this->tasks['defined'][$taskName]) && is_array($this->tasks['defined'][$taskName])) {
$definedTask = $this->tasks['defined'][$taskName];
$baseTask = $definedTask['task'];
if (i... | php | public function setTaskOptions($taskName, $options)
{
$baseTask = $taskName;
if (isset($this->tasks['defined'][$taskName]) && is_array($this->tasks['defined'][$taskName])) {
$definedTask = $this->tasks['defined'][$taskName];
$baseTask = $definedTask['task'];
if (i... | [
"public",
"function",
"setTaskOptions",
"(",
"$",
"taskName",
",",
"$",
"options",
")",
"{",
"$",
"baseTask",
"=",
"$",
"taskName",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"tasks",
"[",
"'defined'",
"]",
"[",
"$",
"taskName",
"]",
")",
"&&",... | Override options for given task
@param string $taskName
@param array $options
@return \TYPO3\Surf\Domain\Model\Workflow | [
"Override",
"options",
"for",
"given",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L283-L296 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.executeStage | protected function executeStage($stage, Node $node, Application $application, Deployment $deployment)
{
foreach (['before', 'tasks', 'after'] as $stageStep) {
foreach (['_', $application->getName()] as $applicationName) {
$label = $applicationName === '_' ? 'for all' : 'for appli... | php | protected function executeStage($stage, Node $node, Application $application, Deployment $deployment)
{
foreach (['before', 'tasks', 'after'] as $stageStep) {
foreach (['_', $application->getName()] as $applicationName) {
$label = $applicationName === '_' ? 'for all' : 'for appli... | [
"protected",
"function",
"executeStage",
"(",
"$",
"stage",
",",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"foreach",
"(",
"[",
"'before'",
",",
"'tasks'",
",",
"'after'",
"]",
"as",
"$",
... | Execute a stage for a node and application
@param string $stage
@param \TYPO3\Surf\Domain\Model\Node $node
@param \TYPO3\Surf\Domain\Model\Application $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@throws DeploymentLockedException | [
"Execute",
"a",
"stage",
"for",
"a",
"node",
"and",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L317-L331 |
TYPO3/Surf | src/Domain/Model/Workflow.php | Workflow.executeTask | protected function executeTask($task, Node $node, Application $application, Deployment $deployment, $stage, array &$callstack = [])
{
foreach (['_', $application->getName()] as $applicationName) {
if (isset($this->tasks['before'][$applicationName][$task])) {
foreach ($this->tasks... | php | protected function executeTask($task, Node $node, Application $application, Deployment $deployment, $stage, array &$callstack = [])
{
foreach (['_', $application->getName()] as $applicationName) {
if (isset($this->tasks['before'][$applicationName][$task])) {
foreach ($this->tasks... | [
"protected",
"function",
"executeTask",
"(",
"$",
"task",
",",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"stage",
",",
"array",
"&",
"$",
"callstack",
"=",
"[",
"]",
")",
"{",
"foreach",
... | Execute a task and consider configured before / after "hooks"
Will also execute tasks that are registered to run before or after this task.
@param string $task
@param \TYPO3\Surf\Domain\Model\Node $node
@param \TYPO3\Surf\Domain\Model\Application $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@pa... | [
"Execute",
"a",
"task",
"and",
"consider",
"configured",
"before",
"/",
"after",
"hooks"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/Workflow.php#L347-L375 |
TYPO3/Surf | src/Task/LockDeploymentTask.php | LockDeploymentTask.rollback | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$unLockDeployment = new UnlockDeploymentTask();
$unLockDeployment->setShellCommandService(new ShellCommandService());
$unLockDeployment->execute($node, $application, $deployment, $op... | php | public function rollback(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$unLockDeployment = new UnlockDeploymentTask();
$unLockDeployment->setShellCommandService(new ShellCommandService());
$unLockDeployment->execute($node, $application, $deployment, $op... | [
"public",
"function",
"rollback",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"unLockDeployment",
"=",
"new",
"UnlockDeploymentTask",
"(",... | Removes lock file on failed deployment
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Removes",
"lock",
"file",
"on",
"failed",
"deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/LockDeploymentTask.php#L66-L71 |
TYPO3/Surf | src/Domain/Service/TaskManager.php | TaskManager.execute | public function execute($taskName, Node $node, Application $application, Deployment $deployment, $stage, array $options = [], $definedTaskName = '')
{
$definedTaskName = $definedTaskName ?: $taskName;
$deployment->getLogger()->info($node->getName() . ' (' . $application->getName() . ') ' . $definedT... | php | public function execute($taskName, Node $node, Application $application, Deployment $deployment, $stage, array $options = [], $definedTaskName = '')
{
$definedTaskName = $definedTaskName ?: $taskName;
$deployment->getLogger()->info($node->getName() . ' (' . $application->getName() . ') ' . $definedT... | [
"public",
"function",
"execute",
"(",
"$",
"taskName",
",",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"$",
"stage",
",",
"array",
"$",
"options",
"=",
"[",
"]",
",",
"$",
"definedTaskName",
"=... | Execute a task
@param string $taskName
@param \TYPO3\Surf\Domain\Model\Node $node
@param \TYPO3\Surf\Domain\Model\Application $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param string $stage
@param array $options Local task options
@param string $definedTaskName
@throws \TYPO3\Surf\Exception\In... | [
"Execute",
"a",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/TaskManager.php#L39-L62 |
TYPO3/Surf | src/Domain/Service/TaskManager.php | TaskManager.rollback | public function rollback()
{
foreach (array_reverse($this->taskHistory) as $historicTask) {
$historicTask['deployment']->getLogger()->info('Rolling back ' . get_class($historicTask['task']));
if (!$historicTask['deployment']->isDryRun()) {
$historicTask['task']->rollb... | php | public function rollback()
{
foreach (array_reverse($this->taskHistory) as $historicTask) {
$historicTask['deployment']->getLogger()->info('Rolling back ' . get_class($historicTask['task']));
if (!$historicTask['deployment']->isDryRun()) {
$historicTask['task']->rollb... | [
"public",
"function",
"rollback",
"(",
")",
"{",
"foreach",
"(",
"array_reverse",
"(",
"$",
"this",
"->",
"taskHistory",
")",
"as",
"$",
"historicTask",
")",
"{",
"$",
"historicTask",
"[",
"'deployment'",
"]",
"->",
"getLogger",
"(",
")",
"->",
"info",
"... | Rollback all tasks stored in the task history in reverse order | [
"Rollback",
"all",
"tasks",
"stored",
"in",
"the",
"task",
"history",
"in",
"reverse",
"order"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/TaskManager.php#L67-L76 |
TYPO3/Surf | src/Domain/Service/TaskManager.php | TaskManager.overrideOptions | protected function overrideOptions($taskName, Deployment $deployment, Node $node, Application $application, array $taskOptions)
{
$globalOptions = array_merge(
$deployment->getOptions(),
$node->getOptions(),
$application->getOptions()
);
$globalTaskOptions... | php | protected function overrideOptions($taskName, Deployment $deployment, Node $node, Application $application, array $taskOptions)
{
$globalOptions = array_merge(
$deployment->getOptions(),
$node->getOptions(),
$application->getOptions()
);
$globalTaskOptions... | [
"protected",
"function",
"overrideOptions",
"(",
"$",
"taskName",
",",
"Deployment",
"$",
"deployment",
",",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"array",
"$",
"taskOptions",
")",
"{",
"$",
"globalOptions",
"=",
"array_merge",
"(",... | Override options for a task
The order of the options is:
Deployment, Node, Application, Task
A task option will always override more global options from the
Deployment, Node or Application.
Global options for a task should be prefixed with the task name to prevent naming
issues between different tasks. For example ... | [
"Override",
"options",
"for",
"a",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/TaskManager.php#L107-L126 |
TYPO3/Surf | src/Domain/Service/TaskManager.php | TaskManager.createTaskInstance | protected function createTaskInstance($taskName)
{
$taskClassName = $this->mapTaskNameToTaskClass($taskName);
$task = new $taskClassName();
if ($task instanceof ShellCommandServiceAwareInterface) {
$task->setShellCommandService(new ShellCommandService());
}
return... | php | protected function createTaskInstance($taskName)
{
$taskClassName = $this->mapTaskNameToTaskClass($taskName);
$task = new $taskClassName();
if ($task instanceof ShellCommandServiceAwareInterface) {
$task->setShellCommandService(new ShellCommandService());
}
return... | [
"protected",
"function",
"createTaskInstance",
"(",
"$",
"taskName",
")",
"{",
"$",
"taskClassName",
"=",
"$",
"this",
"->",
"mapTaskNameToTaskClass",
"(",
"$",
"taskName",
")",
";",
"$",
"task",
"=",
"new",
"$",
"taskClassName",
"(",
")",
";",
"if",
"(",
... | Create a task instance from the given task name
@param string $taskName
@return \TYPO3\Surf\Domain\Model\Task
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Create",
"a",
"task",
"instance",
"from",
"the",
"given",
"task",
"name"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Service/TaskManager.php#L135-L143 |
TYPO3/Surf | src/Task/TYPO3/CMS/CopyConfigurationTask.php | CopyConfigurationTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$deployment->getLogger()->warning(DeprecationMessageFactory::createGenericDeprecationWarningForTask(__CLASS__));
$options['configurationFileExtension'] = isset($options['configurationFileExte... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$deployment->getLogger()->warning(DeprecationMessageFactory::createGenericDeprecationWarningForTask(__CLASS__));
$options['configurationFileExtension'] = isset($options['configurationFileExte... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"deployment",
"->",
"getLogger",
"(",
")",
"->",
"warning... | 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
@throws \TYPO3\Surf\Exception\TaskExecutionException
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/CopyConfigurationTask.php#L43-L48 |
TYPO3/Surf | src/Task/Neos/Flow/PublishResourcesTask.php | PublishResourcesTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, Flow::class, sprintf('Flow application needed for PublishResourcesTask, got "%s"', get_class($application)));
if ($application->getVersion() >= '3.0') {
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, Flow::class, sprintf('Flow application needed for PublishResourcesTask, got "%s"', get_class($application)));
if ($application->getVersion() >= '3.0') {
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"Assert",
"::",
"isInstanceOf",
"(",
"$",
"application",
",",
... | Execute this task
@param Node $node
@param Application|Flow $application
@param Deployment $deployment
@param array $options
@throws InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/PublishResourcesTask.php#L39-L47 |
TYPO3/Surf | src/Command/MigrateCommand.php | MigrateCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$basePath = $this->factory->getDeploymentsBasePath($configurationPath);
$deploymentFileN... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$configurationPath = $input->getOption('configurationPath');
$deploymentName = $input->getArgument('deploymentName');
$basePath = $this->factory->getDeploymentsBasePath($configurationPath);
$deploymentFileN... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"configurationPath",
"=",
"$",
"input",
"->",
"getOption",
"(",
"'configurationPath'",
")",
";",
"$",
"deploymentName",
"=",
"$",
"in... | Execute
@param InputInterface $input
@param OutputInterface $output
@return int | [
"Execute"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/MigrateCommand.php#L53-L71 |
TYPO3/Surf | src/Task/CreateArchiveTask.php | CreateArchiveTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->checkOptionsForValidity($options);
$this->shell->execute('rm -f ' . $options['targetFile'] . '; mkdir -p ' . dirname($options['targetFile']), $node, $deployment);
$sourcePath ... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$this->checkOptionsForValidity($options);
$this->shell->execute('rm -f ' . $options['targetFile'] . '; mkdir -p ' . dirname($options['targetFile']), $node, $deployment);
$sourcePath ... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"checkOptionsForValidity",
"(",
"$",
"options... | Execute 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
@throws \TYPO3\Surf\Exception\TaskExecutionException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/CreateArchiveTask.php#L60-L90 |
TYPO3/Surf | src/Domain/Model/SimpleWorkflow.php | SimpleWorkflow.run | public function run(Deployment $deployment)
{
parent::run($deployment);
$applications = $deployment->getApplications();
if (count($applications) === 0) {
throw InvalidConfigurationException::createNoApplicationConfigured();
}
$nodes = $deployment->getNodes();
... | php | public function run(Deployment $deployment)
{
parent::run($deployment);
$applications = $deployment->getApplications();
if (count($applications) === 0) {
throw InvalidConfigurationException::createNoApplicationConfigured();
}
$nodes = $deployment->getNodes();
... | [
"public",
"function",
"run",
"(",
"Deployment",
"$",
"deployment",
")",
"{",
"parent",
"::",
"run",
"(",
"$",
"deployment",
")",
";",
"$",
"applications",
"=",
"$",
"deployment",
"->",
"getApplications",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"ap... | Sequentially execute the stages for each node, so first all nodes will go through the initialize stage and
then the next stage will be executed until the final stage is reached and the workflow is finished.
A rollback will be done for all nodes as long as the stage switch was not completed.
@param Deployment $deploym... | [
"Sequentially",
"execute",
"the",
"stages",
"for",
"each",
"node",
"so",
"first",
"all",
"nodes",
"will",
"go",
"through",
"the",
"initialize",
"stage",
"and",
"then",
"the",
"next",
"stage",
"will",
"be",
"executed",
"until",
"the",
"final",
"stage",
"is",
... | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/SimpleWorkflow.php#L67-L124 |
TYPO3/Surf | src/Application/Neos/Neos.php | Neos.getCommandPackageKey | public function getCommandPackageKey($command = '')
{
if ($this->getVersion() < '4.0') {
return $this->isNeosCommand($command) ? 'typo3.neos' : 'typo3.flow';
}
return $this->isNeosCommand($command) ? 'neos.neos' : 'neos.flow';
} | php | public function getCommandPackageKey($command = '')
{
if ($this->getVersion() < '4.0') {
return $this->isNeosCommand($command) ? 'typo3.neos' : 'typo3.flow';
}
return $this->isNeosCommand($command) ? 'neos.neos' : 'neos.flow';
} | [
"public",
"function",
"getCommandPackageKey",
"(",
"$",
"command",
"=",
"''",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getVersion",
"(",
")",
"<",
"'4.0'",
")",
"{",
"return",
"$",
"this",
"->",
"isNeosCommand",
"(",
"$",
"command",
")",
"?",
"'typo3.n... | Get the package key to prefix the command
@param string $command
@return string | [
"Get",
"the",
"package",
"key",
"to",
"prefix",
"the",
"command"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/Neos/Neos.php#L75-L81 |
TYPO3/Surf | src/Task/Php/WebOpcacheResetCreateScriptTask.php | WebOpcacheResetCreateScriptTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$workspacePath = $deployment->getWorkspacePath($application);
$webDirectory = $application->hasOption('webDirectory') ? $application->ge... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$workspacePath = $deployment->getWorkspacePath($application);
$webDirectory = $application->hasOption('webDirectory') ? $application->ge... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"(... | Execute this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options Supported options: "scriptBasePath" and "scriptIdentifier"
@throws TaskExecutionException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Php/WebOpcacheResetCreateScriptTask.php#L90-L131 |
TYPO3/Surf | src/Task/Neos/Flow/RunCommandTask.php | RunCommandTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, Flow::class, sprintf('Flow application needed for RunCommandTask, got "%s"', get_class($application)));
$options = $this->configureOptions($options);
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
Assert::isInstanceOf($application, Flow::class, sprintf('Flow application needed for RunCommandTask, got "%s"', get_class($application)));
$options = $this->configureOptions($options);
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"Assert",
"::",
"isInstanceOf",
"(",
"$",
"application",
",",
... | Execute this task
@param Node $node
@param Application|Flow $application
@param Deployment $deployment
@param array $options
@throws InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/RunCommandTask.php#L58-L69 |
TYPO3/Surf | src/Task/Generic/RollbackTask.php | RollbackTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$allReleases = \TYPO3\Surf\findAllReleases($deployment, $node, $application, $this->shell);
$releasesPath = $application->getReleasesPath();
$releases = array_map('trim', array_filt... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$allReleases = \TYPO3\Surf\findAllReleases($deployment, $node, $application, $this->shell);
$releasesPath = $application->getReleasesPath();
$releases = array_map('trim', array_filt... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"allReleases",
"=",
"\\",
"TYPO3",
"\\",
"Surf",
"\\",
... | @param Node $node
@param Application $application
@param Deployment $deployment
@param array $options
@throws \TYPO3\Surf\Exception\TaskExecutionException | [
"@param",
"Node",
"$node",
"@param",
"Application",
"$application",
"@param",
"Deployment",
"$deployment",
"@param",
"array",
"$options"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Generic/RollbackTask.php#L30-L74 |
TYPO3/Surf | src/Task/VarnishBanTask.php | VarnishBanTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$this->shell->executeOrSimulate($options['varnishadm'] . ' -S ' . $options['secretFile'] . ' -T 127.0.0.1:6082 ban.url ' . escapeshellarg($option... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$this->shell->executeOrSimulate($options['varnishadm'] . ' -S ' . $options['secretFile'] . ' -T 127.0.0.1:6082 ban.url ' . escapeshellarg($option... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"(... | Execute 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 | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/VarnishBanTask.php#L49-L53 |
TYPO3/Surf | src/Task/VarnishBanTask.php | VarnishBanTask.simulate | public function simulate(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$this->shell->executeOrSimulate($options['varnishadm'] . ' -S ' . $options['secretFile'] . ' -T 127.0.0.1:6082 status', $node, $deployment);
... | php | public function simulate(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$this->shell->executeOrSimulate($options['varnishadm'] . ' -S ' . $options['secretFile'] . ' -T 127.0.0.1:6082 status', $node, $deployment);
... | [
"public",
"function",
"simulate",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"... | Simulate this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Simulate",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/VarnishBanTask.php#L63-L67 |
TYPO3/Surf | src/Command/SelfUpdateCommand.php | SelfUpdateCommand.configure | protected function configure()
{
$this->setName('self-update')
->addOption(
'stability',
null,
InputOption::VALUE_OPTIONAL,
'GitHub stability value (' . GithubStrategy::STABLE . ', ' . GithubStrategy::UNSTABLE . ', ' . GithubSt... | php | protected function configure()
{
$this->setName('self-update')
->addOption(
'stability',
null,
InputOption::VALUE_OPTIONAL,
'GitHub stability value (' . GithubStrategy::STABLE . ', ' . GithubStrategy::UNSTABLE . ', ' . GithubSt... | [
"protected",
"function",
"configure",
"(",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"'self-update'",
")",
"->",
"addOption",
"(",
"'stability'",
",",
"null",
",",
"InputOption",
"::",
"VALUE_OPTIONAL",
",",
"'GitHub stability value ('",
".",
"GithubStrategy",
... | Configure | [
"Configure"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/SelfUpdateCommand.php#L38-L57 |
TYPO3/Surf | src/Command/SelfUpdateCommand.php | SelfUpdateCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
/** @var GithubStrategy $strategy */
$strategy = $updater->getStrategy();
$strategy->setPackageName('TYPO3/Surf');
$strategy->setPharNam... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
/** @var GithubStrategy $strategy */
$strategy = $updater->getStrategy();
$strategy->setPackageName('TYPO3/Surf');
$strategy->setPharNam... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"updater",
"=",
"new",
"Updater",
"(",
"null",
",",
"false",
",",
"Updater",
"::",
"STRATEGY_GITHUB",
")",
";",
"/** @var GithubStrat... | Execute
@param InputInterface $input
@param OutputInterface $output | [
"Execute"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Command/SelfUpdateCommand.php#L65-L116 |
TYPO3/Surf | src/Application/TYPO3/CMS.php | CMS.registerTasks | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
parent::registerTasks($workflow, $deployment);
if ($deployment->hasOption('initialDeployment') && $deployment->getOption('initialDeployment') === true) {
$workflow->addTask(DumpDatabaseTask::class, 'initialize',... | php | public function registerTasks(Workflow $workflow, Deployment $deployment)
{
parent::registerTasks($workflow, $deployment);
if ($deployment->hasOption('initialDeployment') && $deployment->getOption('initialDeployment') === true) {
$workflow->addTask(DumpDatabaseTask::class, 'initialize',... | [
"public",
"function",
"registerTasks",
"(",
"Workflow",
"$",
"workflow",
",",
"Deployment",
"$",
"deployment",
")",
"{",
"parent",
"::",
"registerTasks",
"(",
"$",
"workflow",
",",
"$",
"deployment",
")",
";",
"if",
"(",
"$",
"deployment",
"->",
"hasOption",... | Register tasks for this application
@param Workflow $workflow
@param Deployment $deployment | [
"Register",
"tasks",
"for",
"this",
"application"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Application/TYPO3/CMS.php#L78-L98 |
TYPO3/Surf | src/Domain/Filesystem/Filesystem.php | Filesystem.get | public function get($filename, $includePath = false, $streamContext = null)
{
return file_get_contents($filename, $includePath, $streamContext);
} | php | public function get($filename, $includePath = false, $streamContext = null)
{
return file_get_contents($filename, $includePath, $streamContext);
} | [
"public",
"function",
"get",
"(",
"$",
"filename",
",",
"$",
"includePath",
"=",
"false",
",",
"$",
"streamContext",
"=",
"null",
")",
"{",
"return",
"file_get_contents",
"(",
"$",
"filename",
",",
"$",
"includePath",
",",
"$",
"streamContext",
")",
";",
... | @param string $filename
@param bool $includePath
@param resource|null $streamContext
@return false|string | [
"@param",
"string",
"$filename",
"@param",
"bool",
"$includePath",
"@param",
"resource|null",
"$streamContext"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Filesystem/Filesystem.php#L33-L36 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.executeCliCommand | protected function executeCliCommand(array $cliArguments, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$phpBinaryPathAndFilename = isset($options['phpBinaryPathAndFilename']) ? ... | php | protected function executeCliCommand(array $cliArguments, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$phpBinaryPathAndFilename = isset($options['phpBinaryPathAndFilename']) ? ... | [
"protected",
"function",
"executeCliCommand",
"(",
"array",
"$",
"cliArguments",
",",
"Node",
"$",
"node",
",",
"CMS",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"de... | Execute this task
@param array $cliArguments
@param \TYPO3\Surf\Domain\Model\Node $node
@param CMS $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@param array $options
@return bool|mixed | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L53-L69 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.determineWorkingDirectoryAndTargetNode | protected function determineWorkingDirectoryAndTargetNode(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($this->workingDirectory, $this->targetNode)) {
if (isset($options['useApplicationWorkspace']) && $options['useApplicationWorkspace'] === true)... | php | protected function determineWorkingDirectoryAndTargetNode(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($this->workingDirectory, $this->targetNode)) {
if (isset($options['useApplicationWorkspace']) && $options['useApplicationWorkspace'] === true)... | [
"protected",
"function",
"determineWorkingDirectoryAndTargetNode",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$... | Determines the path to the working directory and the target node by given options
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Determines",
"the",
"path",
"to",
"the",
"working",
"directory",
"and",
"the",
"target",
"node",
"by",
"given",
"options"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L92-L103 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.packageExists | protected function packageExists($packageKey, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$webDirectory = isset($options['webDirectory']) ? trim($options['webDirectory'], '\\/') : '';
return $this->directoryExists($webDirectory . '/typo3conf/ext/' . $packageKey, $nod... | php | protected function packageExists($packageKey, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$webDirectory = isset($options['webDirectory']) ? trim($options['webDirectory'], '\\/') : '';
return $this->directoryExists($webDirectory . '/typo3conf/ext/' . $packageKey, $nod... | [
"protected",
"function",
"packageExists",
"(",
"$",
"packageKey",
",",
"Node",
"$",
"node",
",",
"CMS",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"webDirectory",
"=",
"isset",
"(... | Checks if a package exists in the packages directory
@param string $packageKey
@param Node $node
@param CMS $application
@param Deployment $deployment
@param array $options
@return bool | [
"Checks",
"if",
"a",
"package",
"exists",
"in",
"the",
"packages",
"directory"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L152-L156 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.directoryExists | protected function directoryExists($directory, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$directory = Files::concatenatePaths([$this->workingDirectory, $directory]);
... | php | protected function directoryExists($directory, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$directory = Files::concatenatePaths([$this->workingDirectory, $directory]);
... | [
"protected",
"function",
"directoryExists",
"(",
"$",
"directory",
",",
"Node",
"$",
"node",
",",
"CMS",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"determineWorkingDi... | Checks if a given directory exists.
@param string $directory
@param Node $node
@param CMS $application
@param Deployment $deployment
@param array $options
@return bool | [
"Checks",
"if",
"a",
"given",
"directory",
"exists",
"."
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L168-L173 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.fileExists | protected function fileExists($pathAndFileName, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$pathAndFileName = $this->workingDirectory . '/' . $pathAndFileName;
return ... | php | protected function fileExists($pathAndFileName, Node $node, CMS $application, Deployment $deployment, array $options = [])
{
$this->determineWorkingDirectoryAndTargetNode($node, $application, $deployment, $options);
$pathAndFileName = $this->workingDirectory . '/' . $pathAndFileName;
return ... | [
"protected",
"function",
"fileExists",
"(",
"$",
"pathAndFileName",
",",
"Node",
"$",
"node",
",",
"CMS",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"determineWorkingD... | Checks if a given file exists.
@param string $pathAndFileName
@param Node $node
@param CMS $application
@param Deployment $deployment
@param array $options
@return bool | [
"Checks",
"if",
"a",
"given",
"file",
"exists",
"."
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L185-L190 |
TYPO3/Surf | src/Task/TYPO3/CMS/AbstractCliTask.php | AbstractCliTask.getCliDispatchScriptFileName | protected function getCliDispatchScriptFileName(array $options = [])
{
$webDirectory = isset($options['webDirectory']) ? trim($options['webDirectory'], '\\/') : '';
return $webDirectory !== '' ? sprintf('%s/typo3/cli_dispatch.phpsh', $webDirectory) : 'typo3/cli_dispatch.phpsh';
} | php | protected function getCliDispatchScriptFileName(array $options = [])
{
$webDirectory = isset($options['webDirectory']) ? trim($options['webDirectory'], '\\/') : '';
return $webDirectory !== '' ? sprintf('%s/typo3/cli_dispatch.phpsh', $webDirectory) : 'typo3/cli_dispatch.phpsh';
} | [
"protected",
"function",
"getCliDispatchScriptFileName",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"webDirectory",
"=",
"isset",
"(",
"$",
"options",
"[",
"'webDirectory'",
"]",
")",
"?",
"trim",
"(",
"$",
"options",
"[",
"'webDirectory'",
... | @param array $options
@return string | [
"@param",
"array",
"$options"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/TYPO3/CMS/AbstractCliTask.php#L211-L215 |
TYPO3/Surf | src/Domain/Model/RollbackWorkflow.php | RollbackWorkflow.run | public function run(Deployment $deployment)
{
parent::run($deployment);
$applications = $deployment->getApplications();
if (count($applications) === 0) {
throw InvalidConfigurationException::createNoApplicationConfigured();
}
$nodes = $deployment->getNodes();
... | php | public function run(Deployment $deployment)
{
parent::run($deployment);
$applications = $deployment->getApplications();
if (count($applications) === 0) {
throw InvalidConfigurationException::createNoApplicationConfigured();
}
$nodes = $deployment->getNodes();
... | [
"public",
"function",
"run",
"(",
"Deployment",
"$",
"deployment",
")",
"{",
"parent",
"::",
"run",
"(",
"$",
"deployment",
")",
";",
"$",
"applications",
"=",
"$",
"deployment",
"->",
"getApplications",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"ap... | @param Deployment $deployment
@throws \TYPO3\Surf\Exception | [
"@param",
"Deployment",
"$deployment"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Domain/Model/RollbackWorkflow.php#L33-L71 |
TYPO3/Surf | src/Task/SymlinkReleaseTask.php | SymlinkReleaseTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$releaseIdentifier = $deployment->getReleaseIdentifier();
$releasesPath = $application->getReleasesPath();
$this->shell->executeOrSimulate('cd ' . $releasesPath . ' && rm -f ./previou... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$releaseIdentifier = $deployment->getReleaseIdentifier();
$releasesPath = $application->getReleasesPath();
$this->shell->executeOrSimulate('cd ' . $releasesPath . ' && rm -f ./previou... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"releaseIdentifier",
"=",
"$",
"deployment",
"->",
"getRele... | 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 | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/SymlinkReleaseTask.php#L35-L41 |
TYPO3/Surf | src/Task/DumpDatabaseTask.php | DumpDatabaseTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$dumpCommand = new Process([
'mysqldump',
'-h',
$options['sourceHost'],
'-u',
$optio... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$options = $this->configureOptions($options);
$dumpCommand = new Process([
'mysqldump',
'-h',
$options['sourceHost'],
'-u',
$optio... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"configureOptions",
"(... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/DumpDatabaseTask.php#L61-L105 |
TYPO3/Surf | src/Task/Neos/Flow/SymlinkConfigurationTask.php | SymlinkConfigurationTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$targetReleasePath = $deployment->getApplicationReleasePath($application);
if ($application instanceof Flow) {
$context = $application->getContext();
} else {
... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
$targetReleasePath = $deployment->getApplicationReleasePath($application);
if ($application instanceof Flow) {
$context = $application->getContext();
} else {
... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"targetReleasePath",
"=",
"$",
"deployment",
"->",
"getAppl... | Executes this task
@param Node $node
@param Application $application
@param Deployment $deployment
@param array $options | [
"Executes",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/Neos/Flow/SymlinkConfigurationTask.php#L41-L66 |
TYPO3/Surf | src/Task/RsyncFoldersTask.php | RsyncFoldersTask.execute | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['folders'])) {
return;
}
$folders = $options['folders'];
if (!is_array($folders)) {
$folders = [$folders];
}
$repla... | php | public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
{
if (!isset($options['folders'])) {
return;
}
$folders = $options['folders'];
if (!is_array($folders)) {
$folders = [$folders];
}
$repla... | [
"public",
"function",
"execute",
"(",
"Node",
"$",
"node",
",",
"Application",
"$",
"application",
",",
"Deployment",
"$",
"deployment",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'folders... | Execute 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
@throws \TYPO3\Surf\Exception\InvalidConfigurationException | [
"Execute",
"this",
"task"
] | train | https://github.com/TYPO3/Surf/blob/0292b88a0cd21dd96174f3306deb98952a0c03a7/src/Task/RsyncFoldersTask.php#L54-L93 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.