diff --git a/CHANGELOG.md b/CHANGELOG.md index 7edbe9b4..0a7585d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +## [3.15.8] 2024-08-26 + +- [#127](https://github.com/OS2Forms/os2forms/pull/127) + Correctly created MaestroNotificationHandler + ## [3.15.7] 2024-08-15 - [#123](https://github.com/OS2Forms/os2forms/pull/123) @@ -257,7 +262,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa - Security in case of vulnerabilities. ``` -[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.15.7...HEAD +[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.15.8...HEAD +[3.15.8]: https://github.com/OS2Forms/os2forms/compare/3.15.7...3.15.8 [3.15.7]: https://github.com/OS2Forms/os2forms/compare/3.15.6...3.15.7 [3.15.6]: https://github.com/OS2Forms/os2forms/compare/3.15.5...3.15.6 [3.15.5]: https://github.com/OS2Forms/os2forms/compare/3.15.4...3.15.5 diff --git a/modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php b/modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php index 9da57179..ccb61a0d 100644 --- a/modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php +++ b/modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php @@ -54,17 +54,9 @@ final class WebformHandlerSF1601 extends WebformHandlerBase { * @phpstan-param array $configuration */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - $instance = new static($configuration, $plugin_id, $plugin_definition); - - $instance->loggerFactory = $container->get('logger.factory'); - $instance->configFactory = $container->get('config.factory'); - $instance->renderer = $container->get('renderer'); - $instance->entityTypeManager = $container->get('entity_type.manager'); - $instance->conditionsValidator = $container->get('webform_submission.conditions_validator'); - $instance->tokenManager = $container->get('webform.token_manager'); - $instance->helper = $container->get(WebformHelperSF1601::class); + $instance = parent::create($container, $configuration, $plugin_id, $plugin_definition); - $instance->setConfiguration($configuration); + $instance->helper = $container->get(WebformHelperSF1601::class); return $instance; } diff --git a/modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php b/modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php index 69d7d9a7..156cc181 100644 --- a/modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php +++ b/modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php @@ -6,7 +6,6 @@ use Drupal\Core\Link; use Drupal\os2forms_forloeb\MaestroHelper; use Drupal\webform\Plugin\WebformHandlerBase; -use Symfony\Component\DependencyInjection\ContainerInterface; /** * Maestro notification handler. @@ -45,23 +44,6 @@ final class MaestroNotificationHandler extends WebformHandlerBase { */ private const NOTIFICATION_SUBJECT_MAX_LENGTH = 128; - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - $instance = new static($configuration, $plugin_id, $plugin_definition); - - $instance->loggerFactory = $container->get('logger.factory'); - $instance->configFactory = $container->get('config.factory'); - $instance->renderer = $container->get('renderer'); - $instance->entityTypeManager = $container->get('entity_type.manager'); - $instance->conditionsValidator = $container->get('webform_submission.conditions_validator'); - - $instance->setConfiguration($configuration); - - return $instance; - } - /** * {@inheritdoc} */