Problem/Motivation

There are two fatals right now:

PHP Fatal error:  Declaration of Drupal\snowball_stemmer\Plugin\search_api\processor\SnowballStemmer::getLanguageManager() must be compatible with Drupal\search_api\Plugin\search_api\processor\Stemmer::getLanguageManager(): Drupal\Core\Language\LanguageManagerInterface in /var/www/html/web/modules/contrib/snowball_stemmer/src/Plugin/search_api/processor/SnowballStemmer.php on line 102
PHP Fatal error:  Declaration of Drupal\snowball_stemmer\Plugin\search_api\processor\SnowballStemmer::setLanguageManager(Drupal\Core\Language\LanguageManagerInterface $language_manager) must be compatible with Drupal\search_api\Plugin\search_api\processor\Stemmer::setLanguageManager(Drupal\Core\Language\LanguageManagerInterface $language_manager): Drupal\search_api\Plugin\search_api\processor\Stemmer in /var/www/html/web/modules/contrib/snowball_stemmer/src/Plugin/search_api/processor/SnowballStemmer.php on line 114

This happens on Search API 1.30 (https://git.drupalcode.org/project/search_api/-/commit/1205ca43095d6512a...)

Steps to reproduce

Update Search API and clear the cache.

Proposed resolution

Remove these methods, because they are exactly the same. But we have to bump dependency to that version, otherwise it will break on installations with Search API < 1.30.

The other solution is to update these methods to be compatible with the Search API one.

CommentFileSizeAuthor
#2 snowball_stemmer-3394257-2.patch1.24 KBniklan
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:

Comments

Niklan created an issue. See original summary.

niklan’s picture

Status: Active » Needs review
StatusFileSize
new1.24 KB

ekes made their first commit to this issue’s fork.

  • ekes committed 0dd6e401 on 2.x authored by Niklan
    Issue #3394257 by Niklan, ekes: Declaration must be compatible with...
ekes’s picture

Status: Needs review » Fixed
Issue tags: +DrupalCon Lille 2023

Many thanks for catching that change in Search API and the patch. Bumping the required version should also work just fine.

avpaderno’s picture

Issue tags: -DrupalCon Lille 2023 +DrupalCon Lille 2023

Status: Fixed » Closed (fixed)

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