Skip to content

Commit

Permalink
[TASK] Remove CreatePackageStatesTask
Browse files Browse the repository at this point in the history
Migrate: Please add "@php vendor/bin/typo3cms install:generatepackagestates" in
your root composer.json file in the post-autoload-dump scripts section.
  • Loading branch information
simonschaufi committed Apr 18, 2020
1 parent 664148f commit c197f6d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 70 deletions.
4 changes: 2 additions & 2 deletions Documentation/DeploymentFlow/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ If you like to add your own tasks to a specific stage of the flow, you can just
$workflow->beforeStage('YourTask', 'cleanup');

// Add tasks that shall be executed before the given task
$workflow->beforeTask(CreatePackageStatesTask::class, 'YourTask');
$workflow->beforeTask(AnotherTask::class, 'YourTask');

// Add tasks that shall be executed after the given task
$workflow->afterTask(CreatePackageStatesTask::class, 'YourTask');
$workflow->afterTask(AnotherTask::class, 'YourTask');

If you like to remove certain tasks from the flow, just do it like that::

Expand Down
5 changes: 1 addition & 4 deletions Documentation/Examples/TYPO3/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ If you would like to deploy a TYPO3 Website a good starting point is to use TYPO
$deployment->getWorkflow()
->beforeTask(\TYPO3\Surf\Task\TYPO3\CMS\SetUpExtensionsTask::class, \TYPO3\Surf\Task\TYPO3\CMS\CompareDatabaseTask::class, $application)
->beforeStage('transfer', \TYPO3\Surf\Task\Php\WebOpcacheResetCreateScriptTask::class, $application)
->afterStage('switch', \TYPO3\Surf\Task\Php\WebOpcacheResetExecuteTask::class, $application)
// CreatePackageStatesTask is done by post-autoload-dump script and can be removed
// https://github.com/TYPO3/TYPO3.CMS.BaseDistribution/blob/9.x/composer.json#L38
->removeTask(\TYPO3\Surf\Task\TYPO3\CMS\CreatePackageStatesTask::class, $application);
->afterStage('switch', \TYPO3\Surf\Task\Php\WebOpcacheResetExecuteTask::class, $application);
}
);
2 changes: 1 addition & 1 deletion Documentation/Tasks/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Besides specifying the execution point via a stage, you can also give an existin

...

$workflow->beforeTask(CreatePackageStatesTask::class,
$workflow->beforeTask(SomeTask::class,
[
'CopyEnvFileTask'
]
Expand Down
2 changes: 0 additions & 2 deletions src/Application/TYPO3/CMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use TYPO3\Surf\Domain\Model\Workflow;
use TYPO3\Surf\Task\DumpDatabaseTask;
use TYPO3\Surf\Task\RsyncFoldersTask;
use TYPO3\Surf\Task\TYPO3\CMS\CreatePackageStatesTask;
use TYPO3\Surf\Task\TYPO3\CMS\FlushCachesTask;
use TYPO3\Surf\Task\TYPO3\CMS\SetUpExtensionsTask;
use TYPO3\Surf\Task\TYPO3\CMS\SymlinkDataTask;
Expand Down Expand Up @@ -60,7 +59,6 @@ public function registerTasks(Workflow $workflow, Deployment $deployment): void
$workflow->addTask(RsyncFoldersTask::class, 'initialize', $this);
}
$workflow
->afterStage('transfer', CreatePackageStatesTask::class, $this)
->afterStage('update', SymlinkDataTask::class, $this)
->afterStage('switch', FlushCachesTask::class, $this)
->addTask(SetUpExtensionsTask::class, 'migrate', $this);
Expand Down
60 changes: 0 additions & 60 deletions src/Task/TYPO3/CMS/CreatePackageStatesTask.php

This file was deleted.

1 change: 0 additions & 1 deletion tests/Unit/Command/DescribeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ public function describeTypo3Cms(): void
<success>TYPO3\Surf\Task\Transfer\RsyncTask</success> (for application TYPO3 CMS)
after:
<success>TYPO3\Surf\Task\Generic\CreateSymlinksTask</success> (for application TYPO3 CMS)
<success>TYPO3\Surf\Task\TYPO3\CMS\CreatePackageStatesTask</success> (for application TYPO3 CMS)
update:
after:
<success>TYPO3\Surf\Task\TYPO3\CMS\SymlinkDataTask</success> (for application TYPO3 CMS)
Expand Down

0 comments on commit c197f6d

Please sign in to comment.