Skip to content

Commit 11434de

Browse 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

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy