Skip to content

Commit e69491c

Browse files
bug symfony#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 symfony#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 | symfony#17038 | License | MIT | Doc PR | Commits ------- 17fcef5 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands
2 parents 1dff640 + 17fcef5 commit e69491c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"symfony/dependency-injection": "~2.3",
2121
"symfony/config": "~2.3,>=2.3.12",
2222
"symfony/event-dispatcher": "~2.1",
23+
"symfony/finder": "~2.0,>=2.0.5",
2324
"symfony/http-foundation": "~2.3,>=2.3.19",
2425
"symfony/http-kernel": "~2.3,>=2.3.22",
2526
"symfony/filesystem": "~2.3",
@@ -34,7 +35,6 @@
3435
"symfony/console": "~2.3",
3536
"symfony/css-selector": "~2.0,>=2.0.5",
3637
"symfony/dom-crawler": "~2.0,>=2.0.5",
37-
"symfony/finder": "~2.0,>=2.0.5",
3838
"symfony/intl": "~2.3",
3939
"symfony/security": "~2.3",
4040
"symfony/form": "~2.3.31",
@@ -45,7 +45,6 @@
4545
},
4646
"suggest": {
4747
"symfony/console": "For using the console commands",
48-
"symfony/finder": "For using the translation loader and cache warmer",
4948
"symfony/form": "For using forms",
5049
"symfony/validator": "For using validation",
5150
"symfony/serializer": "For using the serializer service",

src/Symfony/Component/HttpKernel/Bundle/Bundle.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ public function registerCommands(Application $application)
170170
return;
171171
}
172172

173+
if (!class_exists('Symfony\Component\Finder\Finder')) {
174+
throw new \RuntimeException('You need the symfony/finder component to register bundle commands.');
175+
}
176+
173177
$finder = new Finder();
174178
$finder->files()->name('*Command.php')->in($dir);
175179

0 commit comments

Comments
 (0)