8000 bug #22866 [DI] Check for privates before shared services (ro0NL) · ostrolucky/symfony@44e28e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44e28e3

Browse files
committed
bug symfony#22866 [DI] Check for privates before shared services (ro0NL)
This PR was merged into the 3.2 branch. Discussion ---------- [DI] Check for privates before shared services | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#22801 (comment), symfony#22801 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> cc @stof Commits ------- 4f683a9 [DI] Check for privates before shared services
2 parents 4701cbf + 4794f4f commit 44e28e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/DependencyInjection/WebProfilerExtensionTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ class WebProfilerExtensionTest extends TestCase
2727
*/
2828
private $container;
2929

30-
public static function assertSaneContainer(Container $container, $message = '')
30+
public static function assertSaneContainer(Container $container, $message = '', $knownPrivates = array())
3131
{
3232
$errors = array();
3333
foreach ($container->getServiceIds() as $id) {
34+
if (in_array($id, $knownPrivates, true)) { // to be removed in 4.0
35+
continue;
36+
}
3437
try {
3538
$container->get($id);
3639
} catch (\Exception $e) {
@@ -98,7 +101,7 @@ public function testToolbarConfig($toolbarEnabled, $interceptRedirects, $listene
98101

99102
$this->assertSame($listenerInjected, $this->container->has('web_profiler.debug_toolbar'));
100103

101-
$this->assertSaneContainer($this->getDumpedContainer());
104+
$this->assertSaneContainer($this->getDumpedContainer(), '', array('web_profiler.csp.handler'));
102105

103106
if ($listenerInjected) {
104107
$this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());

0 commit comments

Comments
 (0)
0