Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Check that composer file is normalized
run: |
docker compose run --rm --user "$(id -u):$(id -g)" php composer install
docker compose run --rm --user "$(id -u):$(id -g)" php ./scripts/ci-composer install
docker compose run --rm --user "$(id -u):$(id -g)" php composer normalize --dry-run

test-composer-files:
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Check that dependencies resolve.
run: |
rm -fr vendor/
docker compose run --rm --user "$(id -u):$(id -g)" php composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
docker compose run --rm --user "$(id -u):$(id -g)" php ./scripts/ci-composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

php-coding-standards:
name: PHP coding standards
Expand All @@ -78,7 +78,7 @@ jobs:

- name: Install Dependencies
run: |
docker compose run --rm --user "$(id -u):$(id -g)" php composer install
docker compose run --rm --user "$(id -u):$(id -g)" php ./scripts/ci-composer install

- name: PHPCS
run: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

- [PR-346](https://github.com/OS2Forms/os2forms/pull/346)
Drupal 11 compatibility.

## [5.1.0] 2026-06-03

- [PR-326](https://github.com/OS2Forms/os2forms/pull/326)
Expand Down
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
volumes:
- ./:/app
environment:
HOME: /tmp
COMPOSER_HOME: /tmp/composer
COMPOSER_CACHE_DIR: /tmp/composer-cache
entrypoint:
Expand Down
23 changes: 15 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
"ext-dom": "*",
"ext-soap": "*",
"cweagans/composer-patches": "^1.6.5",
"dompdf/dompdf": "^2.0",
"dompdf/dompdf": "^2.0 || ^3.0",
"drupal/admin_toolbar": "^3.0",
"drupal/advancedqueue": "^1.0",
"drupal/cache_control_override": "^1.1 || ^2.0",
"drupal/coc_forms_auto_export": "^3.0@alpha",
"drupal/config_entity_revisions": "2.0.x-dev",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"drupal/diff": "^1.0",
"drupal/entity_print": "^2.1",
"drupal/eu_cookie_compliance": "^1.8",
Expand All @@ -33,8 +32,8 @@
"drupal/r4032login": "^2.1",
"drupal/redirect": "^1.4",
"drupal/simplesamlphp_auth": "^4.0",
"drupal/smtp": "^1.0@beta",
"drupal/sodium": "^2.4",
"drupal/smtp": "^1.0@dev",
"drupal/sodium": "^2.4 || ^3.0",
"drupal/switch_page_theme": "^4.0",
"drupal/telephone_validation": "^2.2",
"drupal/token": "^1.5",
Expand All @@ -46,7 +45,7 @@
"drupal/webform_node_element": "^1.2",
"drupal/webform_remote_handlers": "^3.0",
"drupal/webform_remote_select": "^1.0.6",
"drupal/webform_rest": "^4.0.0-beta2",
"drupal/webform_rest": "^4.2",
"drupal/webform_validation": "^2.0",
"drupal/webform_views": "^5.0@alpha",
"drupal/workflow_participants": "^3.0@RC",
Expand All @@ -73,7 +72,7 @@
"mglaman/phpstan-drupal": "^1.1",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.6 || ^10.5 || ^11.5",
"wsdltophp/packagegenerator": "^4.0"
},
"repositories": {
Expand Down Expand Up @@ -107,7 +106,9 @@
"drupal-lenient": {
"allowed-list": [
"drupal/coc_forms_auto_export",
"drupal/webform_node_element"
"drupal/webform_node_element",
"drupal/events_logging",
"drupal/switch_page_theme"
Comment on lines +109 to +111

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The continuous need for drupal lenient comes with annoyances, cf. #244. But i suppose that should be considered and/or handled separately!

]
},
"enable-patching": true,
Expand All @@ -122,6 +123,12 @@
"drupal/entity_print": {
"2733781 - Add Export to Word Support": "https://www.drupal.org/files/issues/2019-11-22/2733781-47.patch"
},
"drupal/events_logging": {
"3430351 - Automated Drupal 11 compatibility fixes for events_logging": "https://www.drupal.org/files/issues/2024-03-17/events_logging.2.0.0-beta2.rector.patch"
},
"drupal/switch_page_theme": {
"3489081 - Drupal 11 compatibility for Switch Page Theme": "https://www.drupal.org/files/issues/2025-10-30/switch_page_theme-3489081-20.patch"
},
"drupal/webform": {
"Unlock possibility of using Entity print module export to Word": "https://www.drupal.org/files/issues/2020-02-29/3096552-6.patch",
"Webform computed element post save alter": "https://www.drupal.org/files/issues/2024-06-25/webform_computed_post_save_field_alter.patch",
Expand All @@ -132,7 +139,7 @@
"PHP Warning if unserialize fails (https://www.drupal.org/project/webform_encrypt/issues/3292305)": "https://www.drupal.org/files/issues/2022-06-23/unserialize-php-notice.patch"
},
"drupal/webform_node_element": {
"3290637 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-05-12/webform_node_element_d10-3290637-11.patch"
"3495835 - Drupal 11 compatibility fixes for Webform Node Element": "https://git.drupalcode.org/project/webform_node_element/-/merge_requests/5.diff"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_attachment/os2forms_attachment.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2forms Attachment'
type: module
description: 'Provides OS2forms attachment field'
package: OS2Forms
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11

dependencies:
- 'drupal:os2forms'
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ public function form(array $form, FormStateInterface $form_state) {
* {@inheritdoc}
*/
public function save(array $form, FormStateInterface $form_state) {
parent::save($form, $form_state);
$result = parent::save($form, $form_state);

$form_state->setRedirect('entity.os2forms_attachment_component.list');

return $result;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2forms Autocomplete'
type: module
description: 'Provides autocomplete field'
package: OS2Forms
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11

dependencies:
- 'drupal:os2forms'
2 changes: 1 addition & 1 deletion modules/os2forms_dawa/os2forms_dawa.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2forms DAWA'
type: module
description: 'Provides integration with Danish Addresses Web API (DAWA https://dawa.aws.dk) and provide address autocomplete fields.'
package: OS2Forms
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11

dependencies:
- 'drupal:os2forms'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ type: module
description: 'Example forms for OS2Forms Digital Post.'
package: 'OS2Forms'

core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- 'os2forms_digital_post:os2forms_digital_post'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2Forms Digital Post'
type: module
description: 'Provides integration to Print service provided by Serviceplatformen.'
package: 'OS2Forms'
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- 'beskedfordeler:beskedfordeler'
- 'drupal:advancedqueue'
Expand Down
9 changes: 6 additions & 3 deletions modules/os2forms_digital_post/src/Form/SettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Drupal\os2forms_digital_post\Form;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
Expand All @@ -26,17 +27,18 @@ final class SettingsForm extends ConfigFormBase {
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
private readonly EntityStorageInterface $queueStorage;
protected readonly EntityStorageInterface $queueStorage;

/**
* Constructor.
*/
public function __construct(
ConfigFactoryInterface $config_factory,
TypedConfigManagerInterface $typedConfigManager,
EntityTypeManagerInterface $entityTypeManager,
private readonly Settings $settings,
protected readonly Settings $settings,
) {
parent::__construct($config_factory);
parent::__construct($config_factory, $typedConfigManager);
$this->queueStorage = $entityTypeManager->getStorage('advancedqueue_queue');
}

Expand All @@ -48,6 +50,7 @@ public function __construct(
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('entity_type.manager'),
$container->get(Settings::class),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function createMessage(int $submissionId, MeMoMessage $message, string $r
* @see Message::__set()
*/
public function loadMessage(string $messageUUID): ?Message {
// @phpstan-ignore-next-line (fetchObject invoked with 2 parameters)
return $this->database
->select(self::TABLE_NAME, 'm')
->fields('m')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class SendDigitalPostSF1601 extends JobTypeBase implements ContainerFactor
*
* @var \Drupal\os2forms_digital_post\Helper\WebformHelperSF1601
*/
private WebformHelperSF1601 $helper;
protected WebformHelperSF1601 $helper;

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2Forms Digital Signature'
type: module
description: 'Provides digital signature functionality'
package: 'OS2Forms'
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- 'webform:webform'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,56 +37,56 @@ class DigitalSignatureWebformHandler extends WebformHandlerBase {
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
private readonly ModuleHandlerInterface $moduleHandler;
protected readonly ModuleHandlerInterface $moduleHandler;

/**
* The webform element plugin manager.
*
* @var \Drupal\webform\Plugin\WebformElementManagerInterface
*/
private readonly WebformElementManagerInterface $elementManager;
protected readonly WebformElementManagerInterface $elementManager;

/**
* Logger for channel - os2forms_digital_signature.
*
* @var \Psr\Log\LoggerInterface
*/
private readonly LoggerInterface $logger;
protected readonly LoggerInterface $logger;

/**
* File system interface.
*
* @var \Drupal\Core\File\FileSystemInterface
*/
private readonly FileSystemInterface $fileSystem;
protected readonly FileSystemInterface $fileSystem;

/**
* File repository.
*
* @var \Drupal\file\FileRepositoryInterface
*/
private readonly FileRepositoryInterface $fileRepository;
protected readonly FileRepositoryInterface $fileRepository;

/**
* File URL generator.
*
* @var \Drupal\Core\File\FileUrlGeneratorInterface
*/
private readonly FileUrlGeneratorInterface $fileUrlGenerator;
protected readonly FileUrlGeneratorInterface $fileUrlGenerator;

/**
* OS2Forms signing service.
*
* @var \Drupal\os2forms_digital_signature\Service\SigningService
*/
private readonly SigningService $signingService;
protected readonly SigningService $signingService;

/**
* Settings service.
*
* @var \Drupal\Core\Site\Settings
*/
private readonly Settings $settings;
protected readonly Settings $settings;

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_encrypt/os2forms_encrypt.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Encryption functionality for OS2Forms web-forms
package: OS2Forms
type: module
version: 1.0.0
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- 'drupal:webform_encrypt'
- 'drupal:sodium'
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_encrypt/src/Form/SettingsForm.php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me like this is missing the addition of $typedConfigManager that was added to other setting forms extending ConfigFormBase.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SettingsForm extends ConfigFormBase {
*
* @var \Drupal\encrypt\EncryptionProfileManager
*/
private EncryptionProfileManager $encryptionProfileManager;
protected EncryptionProfileManager $encryptionProfileManager;

public function __construct(ConfigFactoryInterface $config_factory, EncryptionProfileManager $encryptionProfileManager) {
parent::__construct($config_factory);
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_fasit/os2forms_fasit.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2Forms Fasit'
type: module
description: 'Fasit integration'
package: OS2Forms
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- drupal:webform
- drupal:advancedqueue
Expand Down
7 changes: 5 additions & 2 deletions modules/os2forms_fasit/src/Form/SettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Drupal\os2forms_fasit\Form;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
Expand Down Expand Up @@ -33,9 +34,10 @@ final class SettingsForm extends ConfigFormBase {
*/
public function __construct(
ConfigFactoryInterface $config_factory,
private readonly FasitHelper $helper,
TypedConfigManagerInterface $typedConfigManager,
protected readonly FasitHelper $helper,
) {
parent::__construct($config_factory);
parent::__construct($config_factory, $typedConfigManager);
}

/**
Expand All @@ -46,6 +48,7 @@ public function __construct(
public static function create(ContainerInterface $container): self {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get(FasitHelper::class)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Fasit extends JobTypeBase implements ContainerFactoryPluginInterface {
*
* @var \Drupal\os2forms_fasit\Helper\FasitHelper
*/
private FasitHelper $helper;
protected FasitHelper $helper;

/**
* The submission logger.
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_fbs_handler/os2forms_fbs_handler.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'FBS Handler'
type: module
description: 'Provides integration to FBS.'
package: 'OS2Forms'
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- 'webform:webform'
- 'advancedqueue:advancedqueue'
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_forloeb/os2forms_forloeb.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'OS2forms med Forløb Module'
description: 'Adds a Maestro workflow engine and advanced workflow functionality to OS2forms.'
package: OS2Forms
type: module
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11

configure: os2forms_forloeb.settings

Expand Down
Loading
Loading