Problem/Motivation

Some services injected into the \Drupal\search_api_meilisearch\Plugin\search_api\backend\SearchApiMeilisearchBackend are unused and can be removed:

  • LanguageManagerInterface
  • ConfigFactoryInterface
  • Messenger

There is also $warnings property that is being set on line 604 but is unused.

$msg = $this->t('Unknown sort order @order. Assuming "@default".', [
  '@order' => $order,
  '@default' => QueryInterface::SORT_ASC,
]);
$this->warnings[(string) $msg] = 1;

Proposed resolution

Remove the code.

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

bcizej created an issue. See original summary.

bcizej’s picture

Status: Active » Needs review

Ready for review.

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

deaom’s picture

Status: Needs review » Reviewed & tested by the community

Tests were failing on pipeline for D10, for some strange reason, not connected to the code, so I just triggered the pipeline again and now the tests are passing. They are also passing locally for me, which means the removal of code did not break anything and was obsolete. Marking it as RTBC.

  • bcizej committed 06643d4d on 2.x
    Issue #3386859 by bcizej, DeaOm: Remove unused services and params in...
bcizej’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks.

Status: Fixed » Closed (fixed)

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