silverstripe/sapphire — pull request #1317 by chillu (2013-03-20 16:22:46+00:00)
Title: FIX Load _config.php's after static config manifest

This allows more sophisticated handling of config alterations
in _config.php, e.g. additions to DataObject::$db
based on configuration which requires some processing.

See https://github.com/unclecheese/TranslatableDataObject/blob/master/TranslatableDataObject.php for an example use (3.0 compatible code, but have a look at the register() and extraStatics() logic. It adds a decorator plus marks fields as "translatable", and then adds them to MyClass->db() *before* dev/build runs. Since those field names are dynamic based on the configured locales, we can't move it to the YAML config as such.