[FrameworkBundle][HttpKernel] the finder is required to discover bundle commands

This commit is contained in:
Christian Flothmann 2015-12-17 21:59:33 +01:00 committed by Nicolas Grekas
parent b23c9a3b5b
commit 17fcef5aff
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@
"symfony/dependency-injection": "~2.3",
"symfony/config": "~2.3,>=2.3.12",
"symfony/event-dispatcher": "~2.1",
"symfony/finder": "~2.0,>=2.0.5",
"symfony/http-foundation": "~2.3,>=2.3.19",
"symfony/http-kernel": "~2.3,>=2.3.22",
"symfony/filesystem": "~2.3",
@ -34,7 +35,6 @@
"symfony/console": "~2.3",
"symfony/css-selector": "~2.0,>=2.0.5",
"symfony/dom-crawler": "~2.0,>=2.0.5",
"symfony/finder": "~2.0,>=2.0.5",
"symfony/intl": "~2.3",
"symfony/security": "~2.3",
"symfony/form": "~2.3.31",
@ -45,7 +45,6 @@
},
"suggest": {
"symfony/console": "For using the console commands",
"symfony/finder": "For using the translation loader and cache warmer",
"symfony/form": "For using forms",
"symfony/validator": "For using validation",
"symfony/serializer": "For using the serializer service",

View File

@ -170,6 +170,10 @@ abstract class Bundle extends ContainerAware implements BundleInterface
return;
}
if (!class_exists('Symfony\Component\Finder\Finder')) {
throw new \RuntimeException('You need the symfony/finder component to register bundle commands.');
}
$finder = new Finder();
$finder->files()->name('*Command.php')->in($dir);