Problem/Motivation

entity.manager service is deprecated. Remove any usages of this service.

Proposed resolution

Replace any usage of entity.manager service with entity_type.manager service.

Remaining tasks

TBD

User interface changes

N/A

API changes

TBD

Data model changes

N/A

Comments

subhojit777 created an issue. See original summary.

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988
deepakaryan1988’s picture

Assigned: deepakaryan1988 » Unassigned
Status: Active » Needs review
StatusFileSize
new460 bytes

Please review this.

smccabe’s picture

Status: Needs review » Needs work

Hey @deepak, if you search for entity_type.manager you'll see that it is used in at least 4 other places, you'll need to clean those up and anything that depends on them.

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988
Status: Needs work » Active
mglaman’s picture

Status: Active » Postponed

There is no work to be done here, for now.

In \Drupal\commerce_pos\POS it is passing the deprecated manager because it has to.

May as well postpone as all usage is required by core.

joshmiller’s picture

Status: Postponed » Active

We're back at active, because 8.6.x HEAD now has committed a change to the ContentEntityForm to remove the deprecated service.

#2894261: Deprecated service entity.manager needs to be replaced with entity_type.manager in ContentEntityForm

quietone’s picture

Status: Active » Needs review
StatusFileSize
new500 bytes

Needs a reroll

quietone’s picture

Status: Needs review » Needs work
StatusFileSize
new2.26 KB
new2.8 KB

Now change the POSForm constructor.

Not running tests and setting to NW because not user what to do with this usage of $entity_manager, which was added in 2950975-#9

    // This is a hack around what I think is a php bug, at least in 7.1.15
    // The logStorage static can lose reference to the entityType object sometimes.
    $this->logStorage = clone $entity_manager->getStorage('commerce_log');