Skip to content

Commit 92f688c

Browse files
authored
Merge pull request #553 from Coffreo/fix-symfony-deprecation
Replace getRootDir by getProjectDir
2 parents c3f9d40 + 40cc329 commit 92f688c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Command/LoadDataFixturesDoctrineODMCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
112112
if ($dirOrFile) {
113113
$paths = is_array($dirOrFile) ? $dirOrFile : [$dirOrFile];
114114
} elseif ($bundles) {
115-
$paths = [$this->getKernel()->getRootDir().'/DataFixtures/MongoDB'];
115+
$paths = [$this->getKernel()->getProjectDir().'/DataFixtures/MongoDB'];
116116
foreach ($bundles as $bundle) {
117117
$paths[] = $this->getKernel()->getBundle($bundle)->getPath();
118118
}
119119
} else {
120120
$paths = $this->container->getParameter('doctrine_mongodb.odm.fixtures_dirs');
121121
$paths = is_array($paths) ? $paths : [$paths];
122-
$paths[] = $this->getKernel()->getRootDir().'/DataFixtures/MongoDB';
122+
$paths[] = $this->getKernel()->getProjectDir().'/DataFixtures/MongoDB';
123123
foreach ($this->getKernel()->getBundles() as $bundle) {
124124
$paths[] = $bundle->getPath().'/DataFixtures/MongoDB';
125125
}

0 commit comments

Comments
 (0)