Problem/Motivation

As discussed in #3094340: Deprecated Code Report and Drupal 9 readiness, current codebase in tests use the following code to instantiate services:

Drupal::service()

Proposed resolution

It should be with:

$this->container->get()

Remaining tasks

Update tests codebase.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

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

Grimreaper created an issue. See original summary.

Grimreaper’s picture

Status: Active » Needs review
Issue tags: +Europe2020

MR ready for review :)

  • Grimreaper authored e519faa on 8.x-1.x
    Issue #3139434: Coding standard: service usage in tests
    
joachim’s picture

Status: Needs review » Fixed

Looks good!

Merged! Thanks!

Status: Fixed » Closed (fixed)

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