diff --git a/src/QueueUIBatch.php b/src/QueueUIBatch.php index 3639542c13ac066636055e8f778f883579b7f2ac..d2754ed3e772433c95a22716786f9b7274b2bef7 100644 --- a/src/QueueUIBatch.php +++ b/src/QueueUIBatch.php @@ -47,8 +47,15 @@ class QueueUIBatch implements QueueUIBatchInterface { protected ModuleHandlerInterface $moduleHandler, protected MessengerInterface $messenger, protected mixed $queueFactory, - protected LoggerChannelFactoryInterface $logger, - ) {} + protected ?LoggerChannelFactoryInterface $logger = NULL, + ) { + if (is_null($logger)) { + @trigger_error('Calling ' . __METHOD__ . '() without the $logger argument is deprecated in queue_ui:3.2.0 and will be required in queue_ui:4.0.0. See https://www.drupal.org/node/3482168', E_USER_DEPRECATED); + + // @phpstan-ignore-next-line + $this->logger = \Drupal::service('logger.factory'); + } + } /** * {@inheritdoc}