Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #192 from baleyko/bundlefree-kernel-support
Add kernel root directory to fixtures location paths
  • Loading branch information
fabpot committed Sep 10, 2017
2 parents 1f4842c + 1c0e1d1 commit 3f50b9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Command/LoadDataFixturesDoctrineCommand.php
Expand Up @@ -89,8 +89,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($dirOrFile) {
$paths = is_array($dirOrFile) ? $dirOrFile : array($dirOrFile);
} else {
$paths = array();
foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) {
/** @var $kernel \Symfony\Component\HttpKernel\KernelInterface */
$kernel = $this->getApplication()->getKernel();
$paths = array($kernel->getRootDir().'/DataFixtures/ORM');
foreach ($kernel->getBundles() as $bundle) {
$paths[] = $bundle->getPath().'/DataFixtures/ORM';
}
}
Expand Down

0 comments on commit 3f50b9f

Please sign in to comment.