The FigTree Config library allows safer reading of PHP configuration files with explicit exposure of select components of your application's architecture when reading configuration files.
Read the wiki for installation instructions and how to use this package.