Skip to content

Commit 06ed087

Browse files
committed
bug symfony#28751 [FrameworkBundle] Register messenger before the profiler (sroze)
This PR was merged into the 4.1 branch. Discussion ---------- [FrameworkBundle] Register messenger before the profiler | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#28740, symfony#28474 | License | MIT | Doc PR | ø The changes in symfony#28474 made the messenger profiler to never be loaded. Moving the messenger registration to ensure the `messengerConfigEnabled` variable is populated when the profiler is registered. Commits ------- 10537d8 Register messenger before the profiler
2 parents 0e174c4 + 10537d8 commit 06ed087

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ public function load(array $configs, ContainerBuilder $container)
242242
$this->registerTemplatingConfiguration($config['templating'], $container, $loader);
243243
}
244244

245+
if ($this->messengerConfigEnabled = $this->isConfigEnabled($container, $config['messenger'])) {
246+
$this->registerMessengerConfiguration($config['messenger'], $container, $loader, $config['serializer'], $config['validation']);
247+
} else {
248+
$container->removeDefinition('console.command.messenger_consume_messages');
249+
$container->removeDefinition('console.command.messenger_debug');
250+
}
251+
245252
$this->registerValidationConfiguration($config['validation'], $container, $loader);
246253
$this->registerEsiConfiguration($config['esi'], $container, $loader);
247254
$this->registerSsiConfiguration($config['ssi'], $container, $loader);
@@ -271,13 +278,6 @@ public function load(array $configs, ContainerBuilder $container)
271278
$this->registerLockConfiguration($config['lock'], $container, $loader);
272279
}
273280

274-
if ($this->messengerConfigEnabled = $this->isConfigEnabled($container, $config['messenger'])) {
275-
$this->registerMessengerConfiguration($config['messenger'], $container, $loader, $config['serializer'], $config['validation']);
276-
} else {
277-
$container->removeDefinition('console.command.messenger_consume_messages');
278-
$container->removeDefinition('console.command.messenger_debug');
279-
}
280-
281281
if ($this->isConfigEnabled($container, $config['web_link'])) {
282282
if (!class_exists(HttpHeaderSerializer::class)) {
283283
throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed.');

0 commit comments

Comments
 (0)