8000 [FrameworkBundle] fix tests · symfony/symfony@821ca52 · GitHub
[go: up one dir, main page]

Skip to content

Commit 821ca52

Browse files
committed
[FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased annotation_reader service in an after removing compiler pass.
1 parent 2547372 commit 821ca52

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class AnnotationReaderPass implements CompilerPassInterface
1919
public function process(ContainerBuilder $container)
2020
{
2121
// simulate using "annotation_reader" in a compiler pass
22-
$container->get('annotation_reader');
22+
$container->get('test.annotation_reader');
2323
}
2424
}

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection;
1313

14+
use Symfony\Component\DependencyInjection\Alias;
1415
use Symfony\Component\DependencyInjection\ContainerBuilder;
1516
use Symfony\Component\DependencyInjection\Extension\Extension;
1617
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
@@ -26,6 +27,8 @@ public function load(array $configs, ContainerBuilder $container)
2627
{
2728
$configuration = $this->getConfiguration($configs, $container);
2829
$config = $this->processConfiguration($configuration, $configs);
30+
31+
$container->setAlias('test.annotation_reader', new Alias('annotation_reader', true));
2932
}
3033

3134
/**

0 commit comments

Comments
 (0)
0