Drush setLogger error

Created on 12 May 2023, over 1 year ago
Updated 26 May 2023, over 1 year ago

Problem/Motivation

Drupal version   : 10.0.9
PHP version      : 8.1.18
Drush version    : 11.5.1

After installing the official release 2.1 version of the module I get this error if I run a Drush command:

$ drush

PHP Fatal error:  Declaration of Drupal\search_api_fast\Commands\SearchApiFastCommands::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Drush\Commands\DrushCommands::setLogger(Psr\Log\LoggerInterface $logger): void in /app/web/modules/contrib/search_api_fast/src/Commands/SearchApiFastCommands.php on line 65

Steps to reproduce

Install the module and run any Drush command, and see the error.

Proposed resolution

Update /src/Commands/SearchApiFastCommands.php adding : void.

Note: I tried installing the latest dev-release but get an "ArgumentCountError: Too few arguments" error when I run Drush ...

But I can't create the MR against 2.1 version ("The target branch 2.1.0 does not exist. Please restore it or use a different target branch.") so it'll be for 2.0.x.

Also, the default branch on Gitlab is 7.x, maybe it could be updated to 2.x?

See:

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

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

Comments & Activities

Production build 0.71.5 2024