Fix Drush 12 support

Created on 30 November 2023, about 1 year ago
Updated 1 December 2023, about 1 year ago

Problem/Motivation

I cannot use Drush after installing this module with Drush. When Drush checks for Drush commands, it tries to load the SitewideAlertCommands class, which crashes because its class constructor requires arguments.

Steps to reproduce

Install this module then clear caches with Drush.

Proposed resolution

Add a create() method to the SitewideAlertCommands class to provide the required arguments to the class constructor.

See note on https://www.drush.org/12.x/dependency-injection/#create-method and note on https://www.drush.org/12.x/commands/.

Drush 12 expects commandfiles to use a create() method to inject Drupal and Drush dependencies. Prior versions used a drush.services.yml file which is now deprecated and will be removed in Drush 13.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrissnyder Maryland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024