Page MenuHomePhabricator

Introduce concept of Config nodes
Open, Needs TriagePublic

Description

NOTE: pending discussion

A config nodes is a config value that is itself a Config instance.

Extensions can declare that their config lives in a node by setting a value for ConfigNode in extension.json.

If a config node called Foo was declared by an extension, getMainConfig()->get('Foo') will return a Config object that has the config for that node.

Settings files can set values for config in nodes by using a path syntax in the keys, e.g. "Foo.Bar".
Similarly, Config objects should support path resolution: getMainConfig()->get('Foo.Bar') would return a value from the Foo node (could be implemented as a trait or helper object, or as a wrapper around Config objects).

Config schemas will be nested accordingly.

Event Timeline

Perhaps any value that is an assoc array is a config node.

We could have a getChild() or getNode() method on Config that returns a Config. It would wrap an associative array value in a Config object.