Drush 9/10 Compatibility - Module missing extra.drush.services section in its composer.json

Created on 16 December 2020, about 4 years ago
Updated 12 May 2023, almost 2 years ago

Problem/Motivation

I get the following debug output during deployments:
config_devel should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file.

Per drush major version 9/10 documentation https://docs.drush.org/en/9.x/commands/#specifying-the-services-file a module's composer.json file requires an extra.drush.services section in the modules composer.json file.

In Drush 9, the default services file, drush.services.yml, will be used in instances where there is no services section in the Drush extras of the project's composer.json file. In Drush 10, however, the services section must exist, and must name the services file to be used. If a future Drush extension is written such that it only works with Drush 10 and later, then its entry would read "drush.services.yml": "^10", and Drush 9 would not load the extension's commands. It is all the same recommended that Drush 9 extensions explicitly declare their services file with an appropriate version constraint.

Proposed resolution

Add required section to composer.json file.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada spiderman Halifax, NS

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024