Problem/Motivation

Some standard Drupal infrastructure is missing or has minor issues.

1. Missing composer.json

The module has no composer.json. drupal.org generates one automatically, but having it in the repo is good practice for declaring metadata and PHP version requirements.

2. Missing package key in info.yml

Without a package key, the module shows up under "Other" on the Extend page. Something like package: Accessibility would make it easier to find.

3. Typo in phpcs.xml

Line 17:

<!-- Apply"Drupal" and "DrupalPractice coding standards. -->

Missing space after "Apply" and missing opening quote before "DrupalPractice".

4. hook_theme() has conflicting keys

In progressive_accessibility_widget.module, the theme definition for asw_widget sets both render element and variables:

'asw_widget' => [
  'render element' => 'element',
  'variables' => [
    'widget_icon' => NULL,
  ],
],

These two keys are mutually exclusive. When variables is set, render element is ignored. Since the template uses {{ widget_icon }}, only variables should be kept.

Proposed resolution

  • Add composer.json with correct metadata and license
  • Add package: Accessibility to info.yml
  • Fix the phpcs.xml comment
  • Remove render element from hook_theme()
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

scontzen created an issue. See original summary.

scontzen’s picture

Assigned: scontzen » Unassigned
Status: Active » Needs review

Pushed the fix to the branch. Changes:

  • Added composer.json with metadata, keywords and license.
  • Added package: Accessibility to info.yml.
  • Fixed typo in phpcs.xml comment.
  • Removed conflicting render element from hook_theme().

guido_s made their first commit to this issue’s fork.

guido_s’s picture

Status: Needs review » Reviewed & tested by the community

Tested with Drupal 11 and reviewed the code.
Looks good to me.

  • guido_s committed 070fd8e1 on 1.0.x authored by scontzen
    feat: #3584416 Add composer.json, fix info.yml and phpcs.xml, clean up...
guido_s’s picture

Status: Reviewed & tested by the community » Fixed

Merged and will be added in a new release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.