Skip to content

Commit 0c06c8c

Browse files
authored
Merge branch 'develop' into release/3.16.0
2 parents 3e02eee + 227a486 commit 0c06c8c

File tree

5 files changed

+27
-33
lines changed

5 files changed

+27
-33
lines changed

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111

1212
## [Unreleased]
1313

14-
## [3.16.0] 2024-06-14
14+
## [3.16.0] 2024-08-27
1515

16+
[#110](https://github.com/OS2Forms/os2forms/pull/110)
1617
- Obsolete module removing - os2forms_consent
1718
- Obsolete module removing - webform_embed
1819
- Obsolete module removing - field_color
@@ -25,6 +26,16 @@ before starting to add changes. Use example [placed in the end of the page](#exa
2526
- Reduntand dependency removing - webform_scheduled_tasks
2627
- Drupal 10 compability fixes
2728

29+
## [3.15.8] 2024-08-26
30+
31+
- [#127](https://github.com/OS2Forms/os2forms/pull/127)
32+
Correctly created MaestroNotificationHandler
33+
34+
## [3.15.7] 2024-08-15
35+
36+
- [#123](https://github.com/OS2Forms/os2forms/pull/123)
37+
Encrypt subelements
38+
2839
## [3.15.6] 2024-07-16
2940

3041
- [#120](https://github.com/OS2Forms/os2forms/pull/120)
@@ -266,7 +277,11 @@ before starting to add changes. Use example [placed in the end of the page](#exa
266277
- Security in case of vulnerabilities.
267278
```
268279

269-
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.15.4...HEAD
280+
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.15.8...HEAD
281+
[3.15.8]: https://github.com/OS2Forms/os2forms/compare/3.15.7...3.15.8
282+
[3.15.7]: https://github.com/OS2Forms/os2forms/compare/3.15.6...3.15.7
283+
[3.15.6]: https://github.com/OS2Forms/os2forms/compare/3.15.5...3.15.6
284+
[3.15.5]: https://github.com/OS2Forms/os2forms/compare/3.15.4...3.15.5
270285
[3.15.4]: https://github.com/OS2Forms/os2forms/compare/3.15.3...3.15.4
271286
[3.15.3]: https://github.com/OS2Forms/os2forms/compare/3.15.2...3.15.3
272287
[3.15.2]: https://github.com/OS2Forms/os2forms/compare/3.15.1...3.15.2

modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,9 @@ final class WebformHandlerSF1601 extends WebformHandlerBase {
5454
* @phpstan-param array<string, mixed> $configuration
5555
*/
5656
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
57-
$instance = new static($configuration, $plugin_id, $plugin_definition);
58-
59-
$instance->loggerFactory = $container->get('logger.factory');
60-
$instance->configFactory = $container->get('config.factory');
61-
$instance->renderer = $container->get('renderer');
62-
$instance->entityTypeManager = $container->get('entity_type.manager');
63-
$instance->conditionsValidator = $container->get('webform_submission.conditions_validator');
64-
$instance->tokenManager = $container->get('webform.token_manager');
65-
$instance->helper = $container->get(WebformHelperSF1601::class);
57+
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
6658

67-
$instance->setConfiguration($configuration);
59+
$instance->helper = $container->get(WebformHelperSF1601::class);
6860

6961
return $instance;
7062
}

modules/os2forms_encrypt/src/Commands/Os2FormsEncryptCommands.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public function enabledEncrypt(): void {
5858

5959
$defaultEncryptionProfile = $config->get('default_encryption_profile');
6060

61+
if (!$defaultEncryptionProfile) {
62+
$this->output()->writeln('Default encryption profile is missing. Set one and try again.');
63+
return;
64+
}
65+
6166
// Get the storage for Webform entity type.
6267
$webformStorage = $this->entityTypeManager->getStorage('webform');
6368

@@ -66,12 +71,12 @@ public function enabledEncrypt(): void {
6671

6772
/** @var \Drupal\webform\Entity\Webform $webform */
6873
foreach ($webforms as $webform) {
69-
$elements = $webform->getElementsDecoded();
74+
$elements = $webform->getElementsDecodedAndFlattened();
7075
$config = $webform->getThirdPartySettings('webform_encrypt');
7176

7277
$changed = FALSE;
7378
foreach ($elements as $key => $element) {
74-
if (!isset($config['element'][$key])) {
79+
if (!isset($config['element'][$key]) || $config['element'][$key]['encrypt_profile'] === NULL) {
7580
$config['element'][$key] = [
7681
'encrypt' => TRUE,
7782
'encrypt_profile' => $defaultEncryptionProfile,

modules/os2forms_encrypt/src/Helper/Os2FormsEncryptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function enableEncryption(WebformInterface $webform): void {
8989
}
9090

9191
// Check that there are any elements to enable encryption on.
92-
$elements = $webform->getElementsDecoded();
92+
$elements = $webform->getElementsDecodedAndFlattened();
9393

9494
if (empty($elements)) {
9595
return;

modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Drupal\Core\Link;
77
use Drupal\os2forms_forloeb\MaestroHelper;
88
use Drupal\webform\Plugin\WebformHandlerBase;
9-
use Symfony\Component\DependencyInjection\ContainerInterface;
109

1110
/**
1211
* Maestro notification handler.
@@ -45,23 +44,6 @@ final class MaestroNotificationHandler extends WebformHandlerBase {
4544
*/
4645
private const NOTIFICATION_SUBJECT_MAX_LENGTH = 128;
4746

48-
/**
49-
* {@inheritdoc}
50-
*/
51-
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
52-
$instance = new static($configuration, $plugin_id, $plugin_definition);
53-
54-
$instance->loggerFactory = $container->get('logger.factory');
55-
$instance->configFactory = $container->get('config.factory');
56-
$instance->renderer = $container->get('renderer');
57-
$instance->entityTypeManager = $container->get('entity_type.manager');
58-
$instance->conditionsValidator = $container->get('webform_submission.conditions_validator');
59-
60-
$instance->setConfiguration($configuration);
61-
62-
return $instance;
63-
}
64-
6547
/**
6648
* {@inheritdoc}
6749
*/

0 commit comments

Comments
 (0)