Needs work
Project:
Drupal core
Version:
main
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2026 at 18:06 UTC
Updated:
23 Apr 2026 at 20:31 UTC
Jump to comment: Most recent
ConfigFormBase's constructor:
public function __construct(
ConfigFactoryInterface $config_factory,
protected TypedConfigManagerInterface $typedConfigManager,
) {
$this->setConfigFactory($config_factory);
}
This means that all subclasses also need to inject those two dependencies and pass them on.
Now we have setter injection via #[Required] perhaps it's simpler to use this in base class dependencies, so forms only have to consider their own dependencies in the constructor?
Inject the config factory and typed config manager via #[Required]
Deprecate the need to pass these to the base constructor
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
Comment #3
longwave