Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Core/Loader/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ public function loadDefinitions(array $paths = array())
*/
protected function getDefinitions(array $paths = array(), $returnFilename = false)
{
// if no paths defined, we look in all bundles
// if no paths defined, we look in all available paths
if (empty($paths)) {
$paths = array();
// Add the bundle paths
/** @var $bundle \Symfony\Component\HttpKernel\Bundle\BundleInterface */
foreach ($this->kernel->getBundles() as $bundle)
{
Expand All @@ -64,6 +65,12 @@ protected function getDefinitions(array $paths = array(), $returnFilename = fals
$paths[] = $path;
}
}
// Also look for migrations in app directory
$app_dir = $this->kernel->getRootDir();
$app_dir = $app_dir . "/" . $this->versionDirectory;
if (is_dir($app_dir)) {
$paths[] = $app_dir;
}
}

$definitions = array();
Expand Down