FILE: README

Your README.md could stand to be improved. Consider adding similar sections to which you have on your project page (https://www.drupal.org/project/file_access_via_webform):

  • Introduction
  • Requirements
  • Installation
  • Configuration

FILE: webform_jira_service_desk.module

For a new module that aims to be compatible with Drupal 10/11, it is expected it implements hooks as class methods as described in Support for object oriented hook implementations using autowired services.

<?php

/**
 * @file
 * Module file for Webform Jira Service Desk module.
 */

The usual description for a .module file is “Hook implementations for the [module name] module”, where [module name] is the module name given in the .info.yml file.

Build Pipeline Configuration: .gitlab-ci.yml

Given that your module is compatible with Drupal 10 (according to your info.yml), it would probably be a good idea to enable OPT_IN_TEST_PREVIOUS_MAJOR.

...
variables:
  OPT_IN_TEST_PREVIOUS_MAJOR: 0

Use Constructor Property Promotion

- New modules, which are compatible with Drupal 10 and higher versions are expected to include type declarations in property definitions, and use property promotion. Applies to all classes.
Example:

  public function __construct(
    protected EntityTypeManagerInterface $entityTypeManager,
    protected EntityRepositoryInterface $entityRepository,
    protected DateFormatterInterface $dateFormatter,
    TranslationInterface $translation,
  ) {
    $this->setStringTranslation($translation);
  }

Use #config_target in ConfigFormBase forms

With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.

    $form['image_toolkit'] = [
      '#type' => 'radios',
      '#title' => $this->t('Select an image processing toolkit'),
      '#config_target' => 'system.image:toolkit',
      '#options' => [],
    ];

Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
For this change, it is necessary to require at least Drupal 10.3, but that is not an issue, since Drupal 10.2.x is no longer supported.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jannakha created an issue. See original summary.

vladimiraus’s picture

Status: Active » Needs work