Skip to content

Commit

Permalink
[Bug]: Fixes "bin/console doctrine:migrations:migrate" error "The pre…
Browse files Browse the repository at this point in the history
…fix option does not exist." (pimcore#16257)

* Update Application.php

* Update Application.php
  • Loading branch information
kingjia90 authored and robertSt7 committed Nov 23, 2023
1 parent e374cfe commit 74c47ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Pimcore\Tool\MaintenanceModeHelperInterface;
use Pimcore\Version;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Command\LazyCommand;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
Expand Down Expand Up @@ -122,6 +123,10 @@ protected function getDefaultInputDefinition(): InputDefinition

public function add(Command $command): ?Command
{
if ($command instanceof LazyCommand && str_starts_with($command->getName(), 'doctrine:')) {
$command = $command->getCommand();
}

if ($command instanceof DoctrineCommand) {
$definition = $command->getDefinition();

Expand Down

0 comments on commit 74c47ad

Please sign in to comment.