diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 00382b62..64946986 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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: @@ -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 @@ -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: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ddc05ab..fe724679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/compose.yaml b/compose.yaml index a64bf5fb..d3083932 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,6 +9,7 @@ services: volumes: - ./:/app environment: + HOME: /tmp COMPOSER_HOME: /tmp/composer COMPOSER_CACHE_DIR: /tmp/composer-cache entrypoint: diff --git a/composer.json b/composer.json index ba5f18b2..00a05602 100644 --- a/composer.json +++ b/composer.json @@ -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", "drupal/diff": "^1.0", "drupal/entity_print": "^2.1", "drupal/eu_cookie_compliance": "^1.8", @@ -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", @@ -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", @@ -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": { @@ -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" ] }, "enable-patching": true, @@ -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", @@ -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" } } }, diff --git a/modules/os2forms_attachment/os2forms_attachment.info.yml b/modules/os2forms_attachment/os2forms_attachment.info.yml index 1687014f..6835b74e 100644 --- a/modules/os2forms_attachment/os2forms_attachment.info.yml +++ b/modules/os2forms_attachment/os2forms_attachment.info.yml @@ -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' diff --git a/modules/os2forms_attachment/src/Form/AttachmentComponentForm.php b/modules/os2forms_attachment/src/Form/AttachmentComponentForm.php index 2a096e31..ba32ff03 100644 --- a/modules/os2forms_attachment/src/Form/AttachmentComponentForm.php +++ b/modules/os2forms_attachment/src/Form/AttachmentComponentForm.php @@ -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; } /** diff --git a/modules/os2forms_autocomplete/os2forms_autocomplete.info.yml b/modules/os2forms_autocomplete/os2forms_autocomplete.info.yml index 22db8a02..81bdc3eb 100644 --- a/modules/os2forms_autocomplete/os2forms_autocomplete.info.yml +++ b/modules/os2forms_autocomplete/os2forms_autocomplete.info.yml @@ -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' diff --git a/modules/os2forms_dawa/os2forms_dawa.info.yml b/modules/os2forms_dawa/os2forms_dawa.info.yml index bab9de83..6ab1b3d8 100644 --- a/modules/os2forms_dawa/os2forms_dawa.info.yml +++ b/modules/os2forms_dawa/os2forms_dawa.info.yml @@ -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' diff --git a/modules/os2forms_digital_post/modules/os2forms_digital_post_examples/os2forms_digital_post_examples.info.yml b/modules/os2forms_digital_post/modules/os2forms_digital_post_examples/os2forms_digital_post_examples.info.yml index 3863214f..3be7eb8c 100644 --- a/modules/os2forms_digital_post/modules/os2forms_digital_post_examples/os2forms_digital_post_examples.info.yml +++ b/modules/os2forms_digital_post/modules/os2forms_digital_post_examples/os2forms_digital_post_examples.info.yml @@ -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' diff --git a/modules/os2forms_digital_post/os2forms_digital_post.info.yml b/modules/os2forms_digital_post/os2forms_digital_post.info.yml index 0e1408cc..ec5a66c9 100644 --- a/modules/os2forms_digital_post/os2forms_digital_post.info.yml +++ b/modules/os2forms_digital_post/os2forms_digital_post.info.yml @@ -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' diff --git a/modules/os2forms_digital_post/src/Form/SettingsForm.php b/modules/os2forms_digital_post/src/Form/SettingsForm.php index e03f2d8a..ad51220c 100644 --- a/modules/os2forms_digital_post/src/Form/SettingsForm.php +++ b/modules/os2forms_digital_post/src/Form/SettingsForm.php @@ -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; @@ -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'); } @@ -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), ); diff --git a/modules/os2forms_digital_post/src/Helper/BeskedfordelerHelper.php b/modules/os2forms_digital_post/src/Helper/BeskedfordelerHelper.php index c256dc17..e92c3f53 100644 --- a/modules/os2forms_digital_post/src/Helper/BeskedfordelerHelper.php +++ b/modules/os2forms_digital_post/src/Helper/BeskedfordelerHelper.php @@ -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') diff --git a/modules/os2forms_digital_post/src/Plugin/AdvancedQueue/JobType/SendDigitalPostSF1601.php b/modules/os2forms_digital_post/src/Plugin/AdvancedQueue/JobType/SendDigitalPostSF1601.php index 3952d333..15b3dad1 100644 --- a/modules/os2forms_digital_post/src/Plugin/AdvancedQueue/JobType/SendDigitalPostSF1601.php +++ b/modules/os2forms_digital_post/src/Plugin/AdvancedQueue/JobType/SendDigitalPostSF1601.php @@ -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} diff --git a/modules/os2forms_digital_signature/os2forms_digital_signature.info.yml b/modules/os2forms_digital_signature/os2forms_digital_signature.info.yml index 29547e43..c4d4dac1 100644 --- a/modules/os2forms_digital_signature/os2forms_digital_signature.info.yml +++ b/modules/os2forms_digital_signature/os2forms_digital_signature.info.yml @@ -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' diff --git a/modules/os2forms_digital_signature/src/Plugin/WebformHandler/DigitalSignatureWebformHandler.php b/modules/os2forms_digital_signature/src/Plugin/WebformHandler/DigitalSignatureWebformHandler.php index 9a616bfc..7041d9fc 100644 --- a/modules/os2forms_digital_signature/src/Plugin/WebformHandler/DigitalSignatureWebformHandler.php +++ b/modules/os2forms_digital_signature/src/Plugin/WebformHandler/DigitalSignatureWebformHandler.php @@ -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} diff --git a/modules/os2forms_encrypt/os2forms_encrypt.info.yml b/modules/os2forms_encrypt/os2forms_encrypt.info.yml index 5e1e7edf..049b10de 100644 --- a/modules/os2forms_encrypt/os2forms_encrypt.info.yml +++ b/modules/os2forms_encrypt/os2forms_encrypt.info.yml @@ -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' diff --git a/modules/os2forms_encrypt/src/Form/SettingsForm.php b/modules/os2forms_encrypt/src/Form/SettingsForm.php index e80341a8..4a9f4c5c 100644 --- a/modules/os2forms_encrypt/src/Form/SettingsForm.php +++ b/modules/os2forms_encrypt/src/Form/SettingsForm.php @@ -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); diff --git a/modules/os2forms_fasit/os2forms_fasit.info.yml b/modules/os2forms_fasit/os2forms_fasit.info.yml index fe55c94a..c32678bc 100644 --- a/modules/os2forms_fasit/os2forms_fasit.info.yml +++ b/modules/os2forms_fasit/os2forms_fasit.info.yml @@ -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 diff --git a/modules/os2forms_fasit/src/Form/SettingsForm.php b/modules/os2forms_fasit/src/Form/SettingsForm.php index 2cfed651..89cf1752 100644 --- a/modules/os2forms_fasit/src/Form/SettingsForm.php +++ b/modules/os2forms_fasit/src/Form/SettingsForm.php @@ -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; @@ -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); } /** @@ -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) ); } diff --git a/modules/os2forms_fasit/src/Plugin/AdvancedQueue/JobType/Fasit.php b/modules/os2forms_fasit/src/Plugin/AdvancedQueue/JobType/Fasit.php index efc8b2bd..d7d6a20d 100644 --- a/modules/os2forms_fasit/src/Plugin/AdvancedQueue/JobType/Fasit.php +++ b/modules/os2forms_fasit/src/Plugin/AdvancedQueue/JobType/Fasit.php @@ -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. diff --git a/modules/os2forms_fbs_handler/os2forms_fbs_handler.info.yml b/modules/os2forms_fbs_handler/os2forms_fbs_handler.info.yml index e6251ac6..abf35943 100644 --- a/modules/os2forms_fbs_handler/os2forms_fbs_handler.info.yml +++ b/modules/os2forms_fbs_handler/os2forms_fbs_handler.info.yml @@ -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' diff --git a/modules/os2forms_forloeb/os2forms_forloeb.info.yml b/modules/os2forms_forloeb/os2forms_forloeb.info.yml index 9aee352b..04c27a6e 100644 --- a/modules/os2forms_forloeb/os2forms_forloeb.info.yml +++ b/modules/os2forms_forloeb/os2forms_forloeb.info.yml @@ -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 diff --git a/modules/os2forms_forloeb/src/Form/SettingsForm.php b/modules/os2forms_forloeb/src/Form/SettingsForm.php index deb91bb6..0b43c15b 100644 --- a/modules/os2forms_forloeb/src/Form/SettingsForm.php +++ b/modules/os2forms_forloeb/src/Form/SettingsForm.php @@ -3,6 +3,7 @@ namespace Drupal\os2forms_forloeb\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Extension\ModuleExtensionList; @@ -28,11 +29,12 @@ class SettingsForm extends ConfigFormBase { */ public function __construct( ConfigFactoryInterface $configFactory, - private readonly RoleStorageInterface $roleStorage, - private readonly EntityStorageInterface $queueStorage, - private readonly ModuleExtensionList $moduleHandler, + TypedConfigManagerInterface $typedConfigManager, + protected readonly RoleStorageInterface $roleStorage, + protected readonly EntityStorageInterface $queueStorage, + protected readonly ModuleExtensionList $moduleHandler, ) { - parent::__construct($configFactory); + parent::__construct($configFactory, $typedConfigManager); } /** @@ -41,6 +43,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')->getStorage('user_role'), $container->get('entity_type.manager')->getStorage('advancedqueue_queue'), $container->get('extension.list.module'), diff --git a/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php b/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php index 1cf267de..5c67aa61 100644 --- a/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php +++ b/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php @@ -40,7 +40,7 @@ public function __construct( array $configuration, $plugin_id, $plugin_definition, - private readonly MaestroHelper $helper, + protected readonly MaestroHelper $helper, ) { parent::__construct($configuration, $plugin_id, $plugin_definition); } diff --git a/modules/os2forms_nemid/os2forms_nemid.info.yml b/modules/os2forms_nemid/os2forms_nemid.info.yml index 3523807f..f9b7ceaf 100644 --- a/modules/os2forms_nemid/os2forms_nemid.info.yml +++ b/modules/os2forms_nemid/os2forms_nemid.info.yml @@ -2,7 +2,7 @@ name: 'OS2forms NemID' type: module description: 'Provides custom NemID fields and integration with NemID' package: OS2Forms -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:os2forms' diff --git a/modules/os2forms_permissions_by_term/os2forms_permissions_by_term.info.yml b/modules/os2forms_permissions_by_term/os2forms_permissions_by_term.info.yml index 05721595..c409f903 100644 --- a/modules/os2forms_permissions_by_term/os2forms_permissions_by_term.info.yml +++ b/modules/os2forms_permissions_by_term/os2forms_permissions_by_term.info.yml @@ -2,7 +2,7 @@ name: OS2Forms permissions by term type: module description: Adds taxonomy to webform configuration package: OS2Web -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:webform' - 'drupal:permissions_by_term' diff --git a/modules/os2forms_permissions_by_term/src/Form/SettingsForm.php b/modules/os2forms_permissions_by_term/src/Form/SettingsForm.php index ef748f84..72186baa 100644 --- a/modules/os2forms_permissions_by_term/src/Form/SettingsForm.php +++ b/modules/os2forms_permissions_by_term/src/Form/SettingsForm.php @@ -24,7 +24,7 @@ class SettingsForm extends ConfigFormBase { * * @var \Drupal\Core\Entity\EntityFieldManagerInterface */ - private $entityFieldTypeManager; + protected $entityFieldTypeManager; /** * Constructs an SettingsForm object. diff --git a/modules/os2forms_sbsys/os2forms_sbsys.info.yml b/modules/os2forms_sbsys/os2forms_sbsys.info.yml index e6358f66..79d92fe5 100644 --- a/modules/os2forms_sbsys/os2forms_sbsys.info.yml +++ b/modules/os2forms_sbsys/os2forms_sbsys.info.yml @@ -2,7 +2,7 @@ name: 'OS2forms SBSYS integration' type: module description: 'Provides integration with SBSYS ESDH provider.' package: OS2Forms -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:os2forms' diff --git a/modules/os2forms_webform_list/os2forms_webform_list.info.yml b/modules/os2forms_webform_list/os2forms_webform_list.info.yml index c9b90d42..c10bba79 100644 --- a/modules/os2forms_webform_list/os2forms_webform_list.info.yml +++ b/modules/os2forms_webform_list/os2forms_webform_list.info.yml @@ -3,7 +3,7 @@ type: module description: Alters display of webform list and maestro template list package: OS2Web core: 8.x -core_version_requirement: ^8 || ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:webform' - 'drupal:maestro' diff --git a/modules/os2forms_webform_maps/os2forms_webform_maps.info.yml b/modules/os2forms_webform_maps/os2forms_webform_maps.info.yml index 6de28b20..9d2c6943 100644 --- a/modules/os2forms_webform_maps/os2forms_webform_maps.info.yml +++ b/modules/os2forms_webform_maps/os2forms_webform_maps.info.yml @@ -2,7 +2,7 @@ name: 'OS2forms Webform maps' type: module description: 'Provides integration with Leaflet maps and provides map element for webform.' package: OS2Forms -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:os2forms' diff --git a/modules/os2forms_webform_texts/os2forms_webform_texts.info.yml b/modules/os2forms_webform_texts/os2forms_webform_texts.info.yml index a341d77c..a2a4985c 100644 --- a/modules/os2forms_webform_texts/os2forms_webform_texts.info.yml +++ b/modules/os2forms_webform_texts/os2forms_webform_texts.info.yml @@ -2,7 +2,7 @@ name: 'OS2forms webform texts' type: module description: 'Provides reusable webform tekst.' package: OS2Forms -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:webform_node_element' diff --git a/modules/os2forms_webform_texts/templates/node--webform-element.html.twig b/modules/os2forms_webform_texts/templates/node--webform-element.html.twig index 11157c0f..165cae37 100644 --- a/modules/os2forms_webform_texts/templates/node--webform-element.html.twig +++ b/modules/os2forms_webform_texts/templates/node--webform-element.html.twig @@ -13,7 +13,6 @@ view_mode ? 'node--view-mode-' ~ view_mode|clean_class, ] %} -{{ attach_library('classy/node') }} {{ content }} diff --git a/os2forms.info.yml b/os2forms.info.yml index d7e530d0..f7acc729 100644 --- a/os2forms.info.yml +++ b/os2forms.info.yml @@ -2,7 +2,7 @@ name: 'OS2Forms' type: module description: 'Provides advanced webform functionality for Danish Municipalities.' package: OS2Forms -core_version_requirement: ^9 || ^10 +core_version_requirement: ^10 || ^11 dependencies: - 'drupal:editor' diff --git a/scripts/ci-composer b/scripts/ci-composer new file mode 100755 index 00000000..7f77443a --- /dev/null +++ b/scripts/ci-composer @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Install the leniency plugin before resolving this lockless Drupal module. +composer global config --no-plugins allow-plugins.mglaman/composer-drupal-lenient true +composer global require --no-interaction --no-progress --prefer-dist mglaman/composer-drupal-lenient:^1.0 + +exec composer "$@" diff --git a/scripts/code-analysis b/scripts/code-analysis index a0bdb083..bd8fb549 100755 --- a/scripts/code-analysis +++ b/scripts/code-analysis @@ -11,9 +11,9 @@ drupal_composer() { composer --working-dir="$drupal_dir" --no-interaction "$@" } -# Create new Drupal 10 project +# Create new Drupal 11 project if [ ! -f "$drupal_dir/composer.json" ]; then - composer --no-interaction create-project drupal/recommended-project:^10 "$drupal_dir" + composer --no-interaction create-project drupal/recommended-project:^11 "$drupal_dir" fi # Copy our code into the modules folder @@ -38,15 +38,15 @@ drupal_composer config minimum-stability dev # https://getcomposer.org/doc/06-config.md#allow-plugins drupal_composer config --no-plugins allow-plugins true -# Making Drupal 10 compatible -drupal_composer require psr/http-message:^1.0 +# Making Drupal 10/11 compatible +drupal_composer require "psr/http-message:^1.1 || ^2.0" drupal_composer require mglaman/composer-drupal-lenient:^1.0 -drupal_composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/coc_forms_auto_export", "drupal/webform_node_element"]' +drupal_composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/coc_forms_auto_export", "drupal/webform_node_element", "drupal/events_logging", "drupal/switch_page_theme"]' drupal_composer require wikimedia/composer-merge-plugin drupal_composer config extra.merge-plugin.include "$module_path/composer.json" # https://www.drupal.org/project/drupal/issues/3220043#comment-14845434 -drupal_composer require --dev symfony/phpunit-bridge +drupal_composer require --dev symfony/phpunit-bridge -W # Run PHPStan (cd "$drupal_dir/$module_path" && ../../../../vendor/bin/phpstan) diff --git a/src/Plugin/WebformHandler/SaveToFileWebformHandler.php b/src/Plugin/WebformHandler/SaveToFileWebformHandler.php index 58910d17..83abbba3 100644 --- a/src/Plugin/WebformHandler/SaveToFileWebformHandler.php +++ b/src/Plugin/WebformHandler/SaveToFileWebformHandler.php @@ -699,7 +699,7 @@ protected function debug($message, $state, $file_path, $type = 'warning') { '#markup' => $message, ]; - $this->messenger()->addMessage(\Drupal::service('renderer')->renderPlain($build), $file_type); + $this->messenger()->addMessage(\Drupal::service('renderer')->renderPlain($build)); } /**