@@ -193,7 +193,7 @@ public function get_container()
193193 }
194194
195195 $ loader = new YamlFileLoader ($ this ->container , new FileLocator (phpbb_realpath ($ this ->get_config_path ())));
196- $ loader ->load (PHPBB_ENVIRONMENT . '/config.yml ' );
196+ $ loader ->load ($ this -> container -> getParameter ( ' core.environment ' ) . '/config.yml ' );
197197
198198 $ this ->inject_custom_parameters ();
199199
@@ -327,7 +327,7 @@ public function set_cache_dir($cache_dir)
327327 */
328328 protected function get_cache_dir ()
329329 {
330- return $ this ->cache_dir ?: $ this ->phpbb_root_path . 'cache/ ' . PHPBB_ENVIRONMENT . '/ ' ;
330+ return $ this ->cache_dir ?: $ this ->phpbb_root_path . 'cache/ ' . $ this -> get_environment () . '/ ' ;
331331 }
332332
333333 /**
@@ -457,7 +457,7 @@ protected function get_core_parameters()
457457 array (
458458 'core.root_path ' => $ this ->phpbb_root_path ,
459459 'core.php_ext ' => $ this ->php_ext ,
460- 'core.environment ' => PHPBB_ENVIRONMENT ,
460+ 'core.environment ' => $ this -> get_environment () ,
461461 'core.debug ' => DEBUG ,
462462 ),
463463 $ this ->get_env_parameters ()
@@ -495,4 +495,14 @@ protected function get_container_filename()
495495 $ filename = str_replace (array ('/ ' , '. ' ), array ('slash ' , 'dot ' ), $ this ->phpbb_root_path );
496496 return $ this ->get_cache_dir () . 'container_ ' . $ filename . '. ' . $ this ->php_ext ;
497497 }
498+
499+ /**
500+ * Return the name of the current environment.
501+ *
502+ * @return string
503+ */
504+ protected function get_environment ()
505+ {
506+ return PHPBB_ENVIRONMENT ;
507+ }
498508}
0 commit comments