@@ -242,6 +242,13 @@ public function load(array $configs, ContainerBuilder $container)
242
242
$ this ->registerTemplatingConfiguration ($ config ['templating ' ], $ container , $ loader );
243
243
}
244
244
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
+
245
252
$ this ->registerValidationConfiguration ($ config ['validation ' ], $ container , $ loader );
246
253
$ this ->registerEsiConfiguration ($ config ['esi ' ], $ container , $ loader );
247
254
$ this ->registerSsiConfiguration ($ config ['ssi ' ], $ container , $ loader );
@@ -271,13 +278,6 @@ public function load(array $configs, ContainerBuilder $container)
271
278
$ this ->registerLockConfiguration ($ config ['lock ' ], $ container , $ loader );
272
279
}
273
280
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
-
281
281
if ($ this ->isConfigEnabled ($ container , $ config ['web_link ' ])) {
282
282
if (!class_exists (HttpHeaderSerializer::class)) {
283
283
throw new LogicException ('WebLink support cannot be enabled as the WebLink component is not installed. ' );
0 commit comments