From cbee08d913f4aaf5c7568621f08492f64b1640ab Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Tue, 31 Dec 2024 18:44:40 +0000 Subject: [PATCH 1/4] feat: drupal 11 support --- composer.json | 2 +- localgov_workflows.info.yml | 2 +- modules/localgov_review_date/localgov_review_date.info.yml | 2 +- .../localgov_workflows_notifications.info.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index ecd1b9e..1043a50 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": "GPL-2.0-or-later", "minimum-stability": "dev", "require": { - "drupal/core": "^10.2", + "drupal/core": "^10.2 || ^11.0", "drupal/diff": "^1.0", "drupal/responsive_preview": "^2.0", "drupal/scheduled_transitions": "^2.1", diff --git a/localgov_workflows.info.yml b/localgov_workflows.info.yml index 431089a..85b4a72 100644 --- a/localgov_workflows.info.yml +++ b/localgov_workflows.info.yml @@ -2,7 +2,7 @@ name: LocalGov Workflows description: Provides the default editorial workflow for content types. package: LocalGov Drupal type: module -core_version_requirement: ^10.2 +core_version_requirement: ^10 || ^11 dependencies: - drupal:content_moderation diff --git a/modules/localgov_review_date/localgov_review_date.info.yml b/modules/localgov_review_date/localgov_review_date.info.yml index f4a89a5..4408d6a 100644 --- a/modules/localgov_review_date/localgov_review_date.info.yml +++ b/modules/localgov_review_date/localgov_review_date.info.yml @@ -2,7 +2,7 @@ name: LocalGov Review Date description: Provides a review dates entity and widget, along with views for managing content reviews. package: LocalGov Drupal type: module -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - drupal:content_moderation diff --git a/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml b/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml index ff742bb..e085749 100644 --- a/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml +++ b/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml @@ -2,7 +2,7 @@ name: 'LocalGov Workflows Notifications' type: module description: 'Send notifications to service contacts when content needs reviewing.' package: LocalGov Drupal -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - localgov_workflows:localgov_workflows - symfony_mailer:symfony_mailer From 4cd782c7ceb3fdaf156f8527fbbba3ceaa07db12 Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Tue, 4 Feb 2025 15:45:01 +0000 Subject: [PATCH 2/4] empty commit to trigger workflow From f0085d04b471df21b6aa0bb15fb866e6a8138fcd Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Sat, 8 Feb 2025 11:34:00 +0000 Subject: [PATCH 3/4] feat: drupal 11 support --- .../localgov_workflows_notifications.info.yml | 2 +- .../Form/LocalgovWorkflowsNotificationsSettingsForm.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml b/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml index e085749..00e794f 100644 --- a/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml +++ b/modules/localgov_workflows_notifications/localgov_workflows_notifications.info.yml @@ -2,7 +2,7 @@ name: 'LocalGov Workflows Notifications' type: module description: 'Send notifications to service contacts when content needs reviewing.' package: LocalGov Drupal -core_version_requirement: ^10 || ^11 +core_version_requirement: ^10.2 || ^11 dependencies: - localgov_workflows:localgov_workflows - symfony_mailer:symfony_mailer diff --git a/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php b/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php index 7dc4b69..efc157f 100644 --- a/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php +++ b/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php @@ -3,6 +3,7 @@ namespace Drupal\localgov_workflows_notifications\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\localgov_workflows_notifications\NotificationTimer; @@ -27,12 +28,12 @@ final class LocalgovWorkflowsNotificationsSettingsForm extends ConfigFormBase { * The factory for configuration objects. * @param \Drupal\localgov_workflows_notifications\NotificationTimer $notification_timer * The notification timer service. - * @param \Drupal\Core\Config\TypedConfigManagerInterface|null $typedConfigManager + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager * The typed config manager. */ - public function __construct(ConfigFactoryInterface $config_factory, NotificationTimer $notification_timer, protected $typedConfigManager = NULL) { + public function __construct(ConfigFactoryInterface $config_factory, NotificationTimer $notification_timer, protected TypedConfigManagerInterface $typed_config_manager) { $this->timer = $notification_timer; - parent::__construct($config_factory, $typedConfigManager); + parent::__construct($config_factory, $typed_config_manager); } /** From e162ad16bccfe90ad19fde03a33b41bc0dac9f19 Mon Sep 17 00:00:00 2001 From: ekes Date: Tue, 11 Feb 2025 12:51:27 +0100 Subject: [PATCH 4/4] Pass to contructor argument to parent only, don't add to class. Assuming my comment https://github.com/localgovdrupal/localgov_workflows/pull/123#discussion_r1950696266 was correct. --- .../src/Form/LocalgovWorkflowsNotificationsSettingsForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php b/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php index efc157f..49ab929 100644 --- a/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php +++ b/modules/localgov_workflows_notifications/src/Form/LocalgovWorkflowsNotificationsSettingsForm.php @@ -31,7 +31,7 @@ final class LocalgovWorkflowsNotificationsSettingsForm extends ConfigFormBase { * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager * The typed config manager. */ - public function __construct(ConfigFactoryInterface $config_factory, NotificationTimer $notification_timer, protected TypedConfigManagerInterface $typed_config_manager) { + public function __construct(ConfigFactoryInterface $config_factory, NotificationTimer $notification_timer, TypedConfigManagerInterface $typed_config_manager) { $this->timer = $notification_timer; parent::__construct($config_factory, $typed_config_manager); }