Problem/Motivation
In the process of trying to update one of my modules, I found out that \Drupal::config()
now returns an immutable object (and trying to figure out what I need to call to get the editable config object was a bit lost).
I really like that we now have differentiation when dealing with an immutable vs. editable state of configuration. However, it is problematic because config() on its own is ambiguous since we now have multiple states.
Proposed Resolution
Since we are considering having a static function getEditable()
or editableConfig()
to get an editable state of configuration, create a function \Drupal::immutableConfig()
that (hopefully) replaces \Drupal::config
. It makes things more clear that we are dealing with read-only configuration.
Comments
Comment #1
BTMash CreditAttribution: BTMash commented