Stop overriding constructor in action plugin

Created on 12 October 2023, 9 months ago
Updated 19 October 2023, 8 months ago

Problem/Motivation

Plugin classes that use the ContainerFactoryPluginInterface should have dependencies injected via ::create and not ::__construct. This allows parent classes to change their constructor without breaking any code.

@see https://events.drupal.org/seattle2019/sessions/drupal-9-coming-getting-y...

Example: \Drupal\config_sync\Controller\ConfigSyncController::create

Proposed resolution

Fix subclassing and stop overriding constructors.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024