Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae101f4

Browse files
committed
minor #25745 [FrameworkBundle] fix tests (xabbuh)
This PR was merged into the 4.0 branch. Discussion ---------- [FrameworkBundle] fix tests | Q | A | ------------- | --- | Branch? | 4.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Add a public alias so that we can retrieve the private aliased annotation_reader service in an after removing compiler pass. Commits ------- 821ca52 [FrameworkBundle] fix tests
2 parents 2547372 + 821ca52 commit ae101f4

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)