Fix dependency on Drupal Console, pages crash when there's no Drupal Console in the project

Created on 22 August 2025, about 2 months ago

Problem/Motivation

The search_api_synonym.services.yml includes a Drupal Console command.
When Drupal Console isn't available, Drupal will crash, saying

PHP Fatal error: Trait "Drupal\Console\Core\Command\Shared\ContainerAwareCommandTrait" not found in /var/www/html/web/modules/contrib/search_api_synonym/src/Command/ExportDrupalCommand.php on line 25

Steps to reproduce

Install search_api_synonym version 3.0-beta.

Proposed resolution

Move the offending Drupal Console command to an appropriate file, it should live in console.services.yml.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

Changes to the services yml file.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇴Norway svenryen

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