diff --git a/Command/AbstractCommand.php b/Command/AbstractCommand.php index 4a51738..1ff2f5b 100644 --- a/Command/AbstractCommand.php +++ b/Command/AbstractCommand.php @@ -56,7 +56,15 @@ function ($message) use ($output) { protected function getTargetBundle(InputInterface $input) { $bundleName = $input->getArgument('bundle'); + $bundles = $this->getContainer()->get('kernel')->getBundle( + $bundleName, + false + ); - return $this->getContainer()->get('kernel')->getBundle($bundleName); + foreach ($bundles as $bundle) { + if ($bundle->getName() == $bundleName) { + return $bundle; + } + } } }