8000 [HttpClient] TraceableHttpClient: increase decorator's priority by adpeyre · Pull Request #47836 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpClient] TraceableHttpClient: increase decorator's priority #47836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TraceableHttpClient: increase decorator's priority
  • Loading branch information
adpeyre authored and nicolas-grekas committed Dec 13, 2022
commit a4e3b93894a91ad5646b3e708b31c0ebf30792dc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function process(ContainerBuilder $container)
$container->register('.debug.'.$id, TraceableHttpClient::class)
->setArguments([new Reference('.debug.'.$id.'.inner'), new Reference('debug.stopwatch', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])
->addTag('kernel.reset', ['method' => 'reset'])
->setDecoratedService($id);
->setDecoratedService($id, null, 5);
$container->getDefinition('data_collector.http_client')
->addMethodCall('registerClient', [$id, new Reference('.debug.'.$id)]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testItDecoratesHttpClientWithTraceableHttpClient()
$sut->process($container);
$this->assertTrue($container->hasDefinition('.debug.foo'));
$this->assertSame(TraceableHttpClient::class, $container->getDefinition('.debug.foo')->getClass());
$this->assertSame(['foo', null, 0], $container->getDefinition('.debug.foo')->getDecoratedService());
$this->assertSame(['foo', null, 5], $container->getDefinition('.debug.foo')->getDecoratedService());
}

public function testItRegistersDebugHttpClientToCollector()
Expand Down
0