Problem/Motivation

To fix issue https://www.drupal.org/node/2669802 we added optional services to ContentEntityForm. All forms extending it should inject the services as well.

Proposed resolution

Change all forms extending ContentEntityForm.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2835515-2.patch12.99 KBseanB
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

seanB created an issue. See original summary.

seanB’s picture

Status: Active » Needs review
FileSize
12.99 KB

I think this should be all of them. I saw the constructor in ProfileForm doesn't actually add anything, so I removed it. I could create a seperate issue for that, but maybe we can just fix it here.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks straight-forward.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

All methods that override \Drupal\Core\Entity\ContentEntityForm::__construct() have been fixed. Nice tidy up and nice the this in done in a BC friendly way.

Committed ad4629a and pushed to 8.3.x. Thanks!

diff --git a/core/modules/user/src/ProfileForm.php b/core/modules/user/src/ProfileForm.php
index ab519af..fc80230 100644
--- a/core/modules/user/src/ProfileForm.php
+++ b/core/modules/user/src/ProfileForm.php
@@ -2,10 +2,7 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\Query\QueryFactory;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Language\LanguageManagerInterface;
 
 /**
  * Form handler for the profile forms.

Removed all these unused uses on commit.

  • alexpott committed ad4629a on 8.3.x
    Issue #2835515 by seanB: ContentEntityForm interface changed, change all...

Status: Fixed » Closed (fixed)

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