PHP Symfony request stack not found on bundle extension load -
i'm trying create reusable logging bundle can have custom formatter log messages. formatter set in main app's config file that: custom_logger: formatter: appbundle\services\messageformatter then in loggerbundle/dependencyinjection/customloggerextension.php after receive configuration i'm trying logger service , set formatter class customloggerextension extends configurableextension { public function loadinternal(array $mergedconfig, containerbuilder $container) { $loader = new yamlfileloader($container, new filelocator(__dir__ . '/../resources/config')); $loader->load('services.yml'); $class = $mergedconfig['formatter']; $obj = new $class; $container->get('custom.logger')->setformatter($obj); but problem logger uses request stack services: custom.logger: class: loggerbundle\services\logger arguments: ['@request_stack'] and when try servi...