Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bapi_22 created an issue. See original summary.

bapi_22’s picture

Status: Needs work » Needs review
FileSize
641 bytes
bapi_22’s picture

Assigned: bapi_22 » Unassigned
larowlan’s picture

Status: Needs review » Needs work

There are 6 other references to entity manager in the module.

Let's do them all in one go.

Thanks

bapi_22’s picture

Hi Larowlan,

One more EntityManagerInterface I found in the MessageEditForm. Instead of replacing it into EntityTypeManagerInterface, I have removed it, as it's already injected in parent class.

Uploading the updated patch.

Thanks,

bapi_22’s picture

Status: Needs work » Needs review
Venkatesh Rajan.J’s picture

Assigned: Unassigned » Venkatesh Rajan.J
Venkatesh Rajan.J’s picture

FileSize
31.36 KB

Patch applied successfully. Refer the screenshot

Venkatesh Rajan.J’s picture

Assigned: Venkatesh Rajan.J » Unassigned
Status: Needs review » Reviewed & tested by the community
andypost’s picture

Issue summary: View changes
+++ b/src/MessageEditForm.php
@@ -23,13 +22,10 @@ class MessageEditForm extends ContentEntityForm {
-  public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager) {
-    parent::__construct($entity_manager);
+  public function __construct(LanguageManagerInterface $language_manager) {

btw parent class require it, looks you should call parent constructor as well

andypost’s picture

Status: Reviewed & tested by the community » Needs work

Constructor of parent is slightly different in 8,7 core

andypost’s picture

Berdir’s picture

$this->languageManager is actually unused, so we can remove that property and the constructor completely, that will be compatible with all versions.

andypost’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2.89 KB
3.15 KB

I found no other usage + fixed #13

  • larowlan committed f9f653d on 8.x-1.x authored by andypost
    Issue #2907536 by bapi_22, andypost, Venkatesh Rajan.J, Berdir, larowlan...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks 🎉

Status: Fixed » Closed (fixed)

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