As this entity_create('node') is going to be deprecated ,we should not use it any more.
Replaced the deprecated usage of entity_create('node') with a direct call to Node::create().

Please find the patch.

Comments

GPN created an issue. See original summary.

alexdmccabe’s picture

Status: Needs review » Needs work

This looks right for that line, but I see entity_create() called in several other places.

src/Tests/PathautoTestHelperTrait.php:154:    $vocabulary = entity_create('taxonomy_vocabulary', $values);
src/Tests/PathautoTestHelperTrait.php:166:    $term = entity_create('taxonomy_term', $values);
tests/src/Kernel/PathautoKernelTest.php:71:    $this->currentUser = entity_create('user', array('name' => $this->randomMachineName()));
tests/src/Kernel/PathautoKernelTest.php:439:    $account = entity_create('user', $edit);

Let's hit the others, too.

neerajsingh’s picture

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

Removed all the deprecated entity_create().

Attaching the new patch here.

Status: Needs review » Needs work

The last submitted patch, 3: pathauto-2717883-3.patch, failed testing.

alexdmccabe’s picture

The last submitted patch, 3: pathauto-2717883-3.patch, failed testing.

neerajsingh’s picture

StatusFileSize
new2.19 KB
new2.47 KB

Re-rolling the updated patch along with the interdiff with the patch at the issue summary.

rajeshwari10’s picture

Status: Needs work » Needs review

Changing the status to Needs Review for bot's recognition.

Thanks!!

Status: Needs review » Needs work

The last submitted patch, 7: 2717883-7.patch, failed testing.

The last submitted patch, 7: 2717883-7.patch, failed testing.

neerajsingh’s picture

Status: Needs work » Needs review
StatusFileSize
new516 bytes
new2.43 KB

Attaching the patch again, to resolve the bot's failed condition for the patch at #7

  • Berdir committed c6da28c on 8.x-1.x authored by neerajsingh
    Issue #2717883 by neerajsingh, Pashupathi Nath G: Replace deprecated...
berdir’s picture

Status: Needs review » Fixed

Thanks.

Status: Fixed » Closed (fixed)

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