The UpdateSettingsForm class doesn't implement the create() method as per the documentation

https://api.drupal.org/api/drupal/core%21modules%21update%21src%21Update...

  public static function create(ContainerInterface $container) {
    $instance = parent::create($container);
    $instance->emailValidator = $container
      ->get('email.validator');
    return $instance;
  }

The form class should have a __construct method and then provide all injected dependencies in the create method.

Issue fork drupal-3275216

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

akoepke created an issue. See original summary.

akoepke’s picture

Issue summary: View changes
larowlan’s picture

Status: Active » Needs review

I guess it's using this pattern https://www.previousnext.com.au/blog/safely-extending-drupal-8-plugin-cl... but we don't need that in core, because we can't break our own code

larowlan’s picture

Category: Bug report » Task
Issue tags: -Coding standards +Bug Smash Initiative

Also this is more a task than a bug

joachim’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.

  • catch committed e073025 on 10.0.x
    Issue #3275216 by akoepke, larowlan: Fix UpdateSettingsForm dependency...

  • catch committed 89d9f9d on 9.4.x
    Issue #3275216 by akoepke, larowlan: Fix UpdateSettingsForm dependency...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!

Status: Fixed » Closed (fixed)

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