Setup

  • Solr version: N/A
  • Drupal Core version: 9.2 latest
  • Search API version: 1.23.0
  • Search API Solr version: 4.2.7
  • Configured Solr Connector: N/A

Issue

Precisely from 4.1.11 to 4.2.7 due to this commit that changed the constructor signature of a service in a minor/patch version which breaks the service container in given circumstences. See #2918906.

(Also related Search API issue from 2 years ago: #3126367)

Calling any Drush command after composer install leads to

TypeError: Argument 1 passed to Drupal\search_api_solr\Commands\SearchApiSolrCommands::__construct() must be an instance of Drupal\search_api_solr\Utility\SolrCommandHelper, instance of Drupal\Core\Entity\EntityTypeManager given, called in /mnt/files/local_mount/build/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\search_api_solr\Commands\SearchApiSolrCommands->__construct() (line 35 of /mnt/files/local_mount/build/web/modules/contrib/search_api_solr/src/Commands/SearchApiSolrCommands.php).
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mxr576 created an issue. See original summary.

mxr576’s picture

Issue summary: View changes
mxr576’s picture

Status: Active » Needs review
mxr576’s picture

Issue summary: View changes
mxr576’s picture

Issue summary: View changes
mkalkbrenner’s picture

A simple "drush cr" should fix it.

mkalkbrenner’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Needs review » Active

Anytime you update your dependencies using composer you must rebuild your container.
In general you just run "drush updb".

mxr576’s picture

> A simple "drush cr" should fix it.

Unfortunately, it does not.

Although after a few days and another round of unexpected failures elsewhere it can be related to having cache.container stored in Redis which is not flushed by drush cr :S

mkalkbrenner’s picture

Status: Active » Fixed

OK, thanks for the feedback. So there's no broken upgrade path but an issue when storing the "wrong" cache bin in Redis.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.