Problem/Motivation
The member variables of ConfigEntity's map 1-to-1 to the configuration keys in the corresponding config YAML files. Coding standards dictate lowerCamelCase for member variables in OOP code and underscore_separated for config keys. We need to decide what we want here. Most ConfigEntity's are not bitten by this, because they only contain one-word keys, in which case lowerCamelCase and underscore_separated fall together. :-)
We already have an inconsistency in core with the View entity (View::base_table) and the Breakpoint and BreakpointGroup entities.
Proposed resolution
-
Remaining tasks
Decide on one of the following:
- Make class members of configuration entities that map to configuration keys
underscore_separated
.
Con: This violates the coding standards for object-oriented code. - Make configuration keys that map to class members of configuration entities
lowerCamelCase
.
Con: This violates the coding standard for configuration keys. - Change our coding standard to require
lowerCamelCase
for all configuration keys.
Con: It feels unnatural to uselowerCamelCase
for non-object-oriented code. (This in a way applies to 2. as well.) - Introduce an abstraction layer that maps
underscore_separated
configuration keys tolowerCamelCase
class members.
Con: More code, additional abstraction.
User interface changes
-
API changes
-