Missing the drush.service in composer.json

Created on 9 September 2020, over 4 years ago
Updated 13 September 2023, over 1 year ago

Problem/Motivation

I'm using ACSF module with drush 10 on my Site Factory Platform, and when Im trying to update the code I'm getting errors like:
Running BLT deploy tasks on *.acsitefactory.com domain in dev environment on the * subscription.
acsf should have an extra.drush.services section in its composer.json.
See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file.
acsf_duplication should have an extra.drush.services section in its composer.json.
See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file.
acsf_theme should have an extra.drush.services section in its composer.json.
See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file.
acsf_variables should have an extra.drush.services section in its composer.json.
See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file.
.....

Failed to import configuration!
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/
[error] Command `drupal:config:import ` exited with code 1.

From https://docs.drush.org/en/9.x/commands/
Section :
Specifying the Services File

A module's composer.json file stipulates the filename where the Drush services (e.g. the Drush command files) are defined. The default services file is drush.services.yml, which is defined in the extra section of the composer.json file as follows:

"extra": {
    "drush": {
      "services": {
        "drush.services.yml": "^9"
      }
    }
  }

Steps to reproduce

Upding code on some env and on config-import step.

Proposed resolution

Adding

  "extra": {
        "drush": {
            "services": {
                "drush.services.yml": "^9 || ^10"
            }
        }

to acsf and its submodules which implement drush.service.yml

Remaining tasks

User interface changes

None.

API changes

None

Data model changes

None.

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇧🇬Bulgaria bibishani Sofia

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.

  • 🇮🇳India Shifali Baghel Gurgaon

    Hi all,

    I'm getting the same issue after updating my Drupal Core 9.5.10 and Acquia CMS ^2.1.

    Fatal error: Declaration of Acquia\Blt\Robo\Common\EnvironmentDetector::getSiteName($site_path) must be compatible with Acquia\DrupalEnvironmentDetector\AcquiaDrupalEnvironmentDetector::getSiteName(string $site_path): ?string in /var/www/html/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php on line 236

    The attached patch doesn't work because we haven't been using this "acsf" module.
    If I apply the below code in my root composer.json file, that doesn't work at all. Quick help would be appreciated.

    "drush": {
    "services": {
    "drush.services.yml": "^9 || ^10"
    }
    },

  • 🇮🇳India Shifali Baghel Gurgaon

    I got the solution.

    I changed my BLT version from 13.4.0 to 13.7.2 and it worked fine.

    "acquia/blt": "^13.7.2"

Production build 0.71.5 2024