diff --git a/Core/Loader/Filesystem.php b/Core/Loader/Filesystem.php index 2cd7760f..12711cf5 100644 --- a/Core/Loader/Filesystem.php +++ b/Core/Loader/Filesystem.php @@ -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) { @@ -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();