docs for FormBase::config() and configFactory() contradict each other

Created on 9 June 2025, 4 days ago

Problem/Motivation

Docs for configFactory() say:

* When accessing configuration values, use $this->config(). Only use this
* when the config factory needs to be manipulated directly.

That's quite clear -- use configFactory() if you need to edit config. Use config() if you just want to read config.

But the docs for config() say:

* This is the main entry point to the configuration API. Calling
* "$this->config('my_module.admin')" will return a configuration object in
* which the my_module module can store its administrative settings.

This is saying that config() will get me something into which I can store things! That sounds like editing it!

It's probably configFactory() that's correct?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

documentation

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024