bug #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh)
This PR was squashed before being merged into the 2.3 branch (closes #17057).
Discussion
----------
[FrameworkBundle][HttpKernel] the finder is required to discover bundle commands
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17038
| License | MIT
| Doc PR |
Commits
-------
17fcef5
[FrameworkBundle][HttpKernel] the finder is required to discover bundle commands
This commit is contained in:
commit
e69491c819
@ -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",
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user