Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 11434de

Browse filesBrowse files
committed
minor #9802 [HttpKernel] Remove FrameworkBundle dependency in BundleTest (florianv)
This PR was merged into the 2.5-dev branch. Discussion ---------- [HttpKernel] Remove FrameworkBundle dependency in BundleTest | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT `HttpKernel` tests fatal due to missing dependency `AddConsoleCommandPass`. Also removed unused import. Commits ------- 20a064f [HttpKernel] Remove FrameworkBundle dependency in BundleTest
2 parents 0604220 + 20a064f commit 11434de
Copy full SHA for 11434de

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests\Bundle;
1313

14-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
1514
use Symfony\Component\DependencyInjection\ContainerBuilder;
1615
use Symfony\Component\DependencyInjection\Definition;
17-
use Symfony\Component\HttpKernel\Bundle\Bundle;
1816
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle;
1917
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand;
2018
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle;
@@ -38,10 +36,11 @@ public function testRegisterCommands()
3836
public function testRegisterCommandsIngoreCommandAsAService()
3937
{
4038
$container = new ContainerBuilder();
41-
$container->addCompilerPass(new AddConsoleCommandPass());
42-
$definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand');
39+
$commandClass = 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand';
40+
$definition = new Definition($commandClass);
4341
$definition->addTag('console.command');
4442
$container->setDefinition('my-command', $definition);
43+
$container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $commandClass)), 'my-command');
4544
$container->compile();
4645

4746
$application = $this->getMock('Symfony\Component\Console\Application');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.