You need to clarify a bit; Do you want each pool to automatically include the parameters.yml file? I'm afraid you will need to change the core of Symfony DI. However, there is an easy alternative.
If you create your own package with some DependencyInjection , you can add $loader->load('parameters.yml'); to the package extension class.
The extension class must be located in YourBundle/DependencyInjection/YourBundleExtension.php .
The class should look like this
class YourBundleExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); $loader->load('parameters.yml');
So, in this case, the parameters.yml file will be in YourBundle/Resources/config/parameters.yml .
Thomas Potaire
source share