Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!![TASK] Remove upgrade:prepare #1107

Merged
merged 1 commit into from Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions Classes/Console/Command/Upgrade/UpgradeListCommand.php
Expand Up @@ -39,9 +39,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
{
$upgradeHandling = new UpgradeHandling();
if (!$upgradeHandling->isUpgradePrepared()) {
$output->writeln('<error>Preparation incomplete. Please run upgrade:prepare before running this command.</error>');

return 1;
$upgradeHandling->prepareUpgrade();
}

$all = $input->getOption('all');
Expand Down
4 changes: 1 addition & 3 deletions Classes/Console/Command/Upgrade/UpgradeRunCommand.php
Expand Up @@ -127,9 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->upgradeHandling = $this->upgradeHandling ?? new UpgradeHandling();
if (!$this->upgradeHandling->isUpgradePrepared()) {
$output->writeln('<error>Preparation incomplete. Please run upgrade:prepare before running this command.</error>');

return 1;
$this->upgradeHandling->prepareUpgrade();
}
[$wizardsToExecute, $confirmations, $denies, $force] = $this->unpackArguments($input);
$io = new SymfonyStyle($input, $output);
Expand Down
5 changes: 0 additions & 5 deletions Configuration/Commands.php
Expand Up @@ -104,11 +104,6 @@
],
'runLevel' => \Helhum\Typo3Console\Core\Booting\RunLevel::LEVEL_FULL,
],
'upgrade:prepare' => [
'vendor' => 'typo3_console',
'class' => \Helhum\Typo3Console\Command\Upgrade\UpgradePrepareCommand::class,
'runLevel' => \Helhum\Typo3Console\Core\Booting\RunLevel::LEVEL_COMPILE,
],
'upgrade:run' => [
'vendor' => 'typo3_console',
'class' => \Helhum\Typo3Console\Command\Upgrade\UpgradeRunCommand::class,
Expand Down
2 changes: 0 additions & 2 deletions Documentation/CommandReference/Index.rst
Expand Up @@ -96,7 +96,5 @@ Available Commands

UpgradeList

UpgradePrepare

UpgradeRun

22 changes: 0 additions & 22 deletions Documentation/CommandReference/UpgradePrepare.rst

This file was deleted.

17 changes: 0 additions & 17 deletions Tests/Console/Functional/Command/UpgradeCommandControllerTest.php
Expand Up @@ -18,20 +18,6 @@

class UpgradeCommandControllerTest extends AbstractCommandTest
{
/**
* @test
*/
public function upgradePrepareCanBeRun(): void
{
$this->executeConsoleCommand('configuration:remove', ['EXTCONF/helhum-typo3-console', '--force']);
$output = $this->executeConsoleCommand('upgrade:prepare');
$this->assertStringNotContainsString('Preparation has been done before, repeating preparation and checking extensions', $output);
$this->assertStringContainsString('Upgrade preparations successfully executed', $output);
$output = $this->executeConsoleCommand('upgrade:prepare');
$this->assertStringContainsString('Preparation has been done before, repeating preparation and checking extensions', $output);
$this->assertStringContainsString('Upgrade preparations successfully executed', $output);
}

/**
* @test
*/
Expand All @@ -40,7 +26,6 @@ public function upgradeListShowsActiveWizards(): void
self::installFixtureExtensionCode('ext_upgrade');
try {
$this->executeConsoleCommand('extension:setup', ['-e', 'ext_upgrade']);
$this->executeConsoleCommand('upgrade:prepare');

$output = $this->executeConsoleCommand('upgrade:list');
$this->assertStringContainsString('normalWizard', $output);
Expand All @@ -63,8 +48,6 @@ public function upgradeRunCanRunIndividualWizardWhichIsMarkedExecutedAndCanBeRun
self::installFixtureExtensionCode('ext_upgrade');
$this->executeConsoleCommand('extension:setup', ['-e', 'ext_upgrade']);
try {
$this->executeConsoleCommand('upgrade:prepare');

$output = $this->executeConsoleCommand('upgrade:run', ['normalWizard']);
$this->assertStringContainsString('Successfully executed upgrade wizard "normalWizard"', $output);

Expand Down