Skip to content
Snippets Groups Projects
Commit 708402eb authored by Luhur Abdi Rizal's avatar Luhur Abdi Rizal Committed by Steven Jones
Browse files

Issue #3476003 by el7cosmos, steven jones: Drupal 11 compatibility

parent 702a1f9c
No related branches found
No related tags found
1 merge request!2Resolve #3476003 "Drupal 11 compatibility"
Pipeline #295192 passed
......@@ -20,6 +20,6 @@
"source": "https://git.drupalcode.org/project/queue_mail"
},
"require": {
"drupal/core": "^9.4 || ^10.0"
"drupal/core": "^9.4 || ^10.0 || ^11.0"
}
}
name: Queue Mail Language
type: module
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^9.4 || ^10 || ^11
description: Adds language support for queued mails.
package: Mail
dependencies:
......
......@@ -7,12 +7,12 @@ use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Mail\MailManagerInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Theme\ThemeInitializationInterface;
use Drupal\Core\Theme\ThemeManagerInterface;
use Drupal\language\ConfigurableLanguageManagerInterface;
use Drupal\queue_mail\Plugin\QueueWorker\SendMailQueueWorker;
use Drupal\queue_mail_language\QueueMailLanguageNegotiator;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -67,7 +67,7 @@ class LanguageAwareSendMailQueueWorker extends SendMailQueueWorker {
MailManagerInterface $mail_manager,
LoggerChannelFactoryInterface $logger_factory,
ConfigFactoryInterface $config_factory,
ContainerAwareInterface $queue_factory,
QueueFactory $queue_factory,
ModuleHandlerInterface $module_handler,
TimeInterface $time,
ConfigurableLanguageManagerInterface $language_manager,
......
name: Queue Mail
type: module
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^9.4 || ^10 || ^11
description: Queues all mail sent by your Drupal site so that it is sent via cron using the Drupal Queue API. This is helpful for large traffic sites where sending a lot of emails per page request can slow things down considerably.
package: Mail
configure: queue_mail.admin_settings
......@@ -2,12 +2,13 @@
namespace Drupal\queue_mail\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RedirectDestinationInterface;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -39,8 +40,13 @@ class QueueMailSettingsForm extends ConfigFormBase {
* @param Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination
* The redirect destination.
*/
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, RedirectDestinationInterface $redirect_destination) {
parent::__construct($config_factory);
public function __construct(
ConfigFactoryInterface $config_factory,
TypedConfigManagerInterface $typed_config_manager,
ModuleHandlerInterface $module_handler,
RedirectDestinationInterface $redirect_destination,
) {
parent::__construct($config_factory, $typed_config_manager);
$this->moduleHandler = $module_handler;
$this->redirectDestination = $redirect_destination;
......@@ -52,6 +58,7 @@ class QueueMailSettingsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('module_handler'),
$container->get('redirect.destination')
);
......
......@@ -10,11 +10,11 @@ use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Mail\MailManagerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Queue\DelayedRequeueException;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Theme\ThemeInitializationInterface;
use Drupal\Core\Theme\ThemeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -115,7 +115,7 @@ class SendMailQueueWorker extends QueueWorkerBase implements ContainerFactoryPlu
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, array $plugin_definition, ThemeManagerInterface $theme_manager, ThemeInitializationInterface $theme_init, MailManagerInterface $mail_manager, LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, ContainerAwareInterface $queue_factory, ModuleHandlerInterface $module_handler, TimeInterface $time) {
public function __construct(array $configuration, $plugin_id, array $plugin_definition, ThemeManagerInterface $theme_manager, ThemeInitializationInterface $theme_init, MailManagerInterface $mail_manager, LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, QueueFactory $queue_factory, ModuleHandlerInterface $module_handler, TimeInterface $time) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->themeManager = $theme_manager;
......
name: Queue Mail Test
type: module
description: Module for use by the queue mail module tests.
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^9.4 || ^10 || ^11
dependencies:
- queue_mail:queue_mail
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment