Skip to content

Commit

Permalink
Commands: use execute method, not run
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Oct 2, 2024
1 parent 5e2892b commit 7026c02
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Command/MigrationCheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function configure(): void
$this->setDescription('Check if entities are in sync with database and if migrations were executed');
}

public function run(InputInterface $input, OutputInterface $output): int
public function execute(InputInterface $input, OutputInterface $output): int
{
$exitCode = self::EXIT_OK;
$exitCode |= $this->checkMigrationsExecuted($output);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/MigrationGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function configure(): void
$this->setDescription('Generate migration class');
}

public function run(InputInterface $input, OutputInterface $output): int
public function execute(InputInterface $input, OutputInterface $output): int
{
$sqls = $this->migrationService->generateDiffSqls();

Expand Down
2 changes: 1 addition & 1 deletion src/Command/MigrationInitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function configure(): void
$this->setDescription('Create migration table in database');
}

public function run(InputInterface $input, OutputInterface $output): int
public function execute(InputInterface $input, OutputInterface $output): int
{
$output->write('<comment>Creating migration table... </comment>');
$initialized = $this->migrationService->initializeMigrationTable();
Expand Down
2 changes: 1 addition & 1 deletion src/Command/MigrationRunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function configure(): void
->addArgument(self::ARGUMENT_PHASE, InputArgument::REQUIRED, MigrationPhase::BEFORE . '|' . MigrationPhase::AFTER . '|' . self::PHASE_BOTH);
}

public function run(InputInterface $input, OutputInterface $output): int
public function execute(InputInterface $input, OutputInterface $output): int
{
$phaseArgument = $input->getArgument(self::ARGUMENT_PHASE);

Expand Down
2 changes: 1 addition & 1 deletion src/Command/MigrationSkipCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function configure(): void
$this->setDescription('Mark all not executed migrations as executed in both phases');
}

public function run(InputInterface $input, OutputInterface $output): int
public function execute(InputInterface $input, OutputInterface $output): int
{
$skipped = false;

Expand Down

0 comments on commit 7026c02

Please sign in to comment.