attach static method
Puts the relaxed source first in environment's sources, adding it
or moving it back to the front. Calling it again is harmless.
Implementation
static void attach(ConfigurableEnvironment environment) {
final sources = environment.propertySources;
var attached = sources.get(attachedPropertySourceName);
if (attached is! ConfigurationPropertySourcesPropertySource ||
!identical(attached.source, sources)) {
attached = ConfigurationPropertySourcesPropertySource(
attachedPropertySourceName,
sources,
);
}
sources
..remove(attachedPropertySourceName)
..addFirst(attached);
}