Problem/Motivation

The entityManager is deprecated. See: https://www.drupal.org/node/2549139
File: /src/Form/ForumForm.php

Proposed resolution

Replace deprecated usage of entityManager with a \Drupal::entityTypeManager()

Remaining tasks

  1. Create patch
  2. Needs Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Roman Dyn created an issue. See original summary.

Roman Dyn’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.2 KB
i-trokhanenko’s picture

Status: Needs review » Needs work

Hi, thanks for the patch.
You don't need to inject \Drupal::entityTypeManager() class ForumForm has protected variable entityTypeManager , and it should be used.

Roman Dyn’s picture

Status: Needs work » Needs review
StatusFileSize
new1.2 KB

@i-trokhanenko, thanks. Added new patch.

i-trokhanenko’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Patch #4 looks good for me. +1 RTBC
Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Related issues: +#2969109: Replace deprecated usages of entityManager in form classes

This is part of #2969109: Replace deprecated usages of entityManager in form classes. It's important this is done there because that issue makes core consistent.