I am using the component installer in a project where I also use parameters for multiple environments.
Thus, I have the following config.php:
return (new ConfigAggregator([
MyModule\ConfigProvider::class,
], null, [
new LazyParameterPostProcessor(static function (): array {
return (new ConfigAggregator([
new PhpFileProvider(sprintf(
'%s/parameters{,*.}{,%s,local}.php',
__DIR__,
'someenvironment'
)),
]))->getMergedConfig();
}),
]))->getMergedConfig();
Bug Report
Summary
I am using the component installer in a project where I also use parameters for multiple environments. Thus, I have the following
config.php
:This will actually do the following:
LazyParameterPostProcessor
Current behavior
A new config provider is being added to the callable of
LazyParameterPostProcessor
as there is anotherConfigAggregator
instance.How to reproduce
Use configuration above for reproducibility.
Expected behavior
Add the new config provider to the first appearance of a
ConfigAggregator
.