Problem/Motivation

Static code analysis returns the following error:

 ------ --------------------------------------------------------------------------
  Line   office_hours.install
 ------ --------------------------------------------------------------------------
  45     Call to deprecated method entityManager() of class Drupal:
         in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
         Use \Drupal::entityTypeManager() instead in most cases. If the needed
         method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
         deprecated \Drupal\Core\Entity\EntityManager to find the
         correct interface or service.
 ------ --------------------------------------------------------------------------

Proposed resolution

Replace calls to deprecated entityManager with the entityFieldManager.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 3072259-2.patch688 bytesidebr

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new688 bytes

Attached patch replaces calls to deprecated entityManager with the entityFieldManager.

  • johnv committed c76991e on 8.x-1.x authored by idebr
    Issue #3072259 by idebr: Replace deprecated entityManager with...
johnv’s picture

Title: Replace calls to deprecated entityManager with the entityFieldManager » Replace deprecated entityManager with entityFieldManager
Version: 8.x-1.x-dev » 8.x-1.2
Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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