mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/12775] Fix container_builder
PHPBB3-12775
This commit is contained in:
@@ -38,7 +38,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
|||||||
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
|
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
|
||||||
$phpbb_class_loader_ext->register();
|
$phpbb_class_loader_ext->register();
|
||||||
|
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder->set_use_extensions(false);
|
$phpbb_container_builder->set_use_extensions(false);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
|
|
||||||
|
@@ -95,7 +95,7 @@ $phpbb_class_loader_ext->register();
|
|||||||
phpbb_load_extensions_autoloaders($phpbb_root_path);
|
phpbb_load_extensions_autoloaders($phpbb_root_path);
|
||||||
|
|
||||||
// Set up container
|
// Set up container
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container = $phpbb_container_builder->get_container();
|
$phpbb_container = $phpbb_container_builder->get_container();
|
||||||
|
|
||||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||||
|
@@ -61,7 +61,7 @@ if (isset($_GET['avatar']))
|
|||||||
$phpbb_class_loader_ext->register();
|
$phpbb_class_loader_ext->register();
|
||||||
|
|
||||||
// Set up container
|
// Set up container
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container = $phpbb_container_builder->get_container();
|
$phpbb_container = $phpbb_container_builder->get_container();
|
||||||
|
|
||||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||||
|
@@ -86,7 +86,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
|||||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||||
|
|
||||||
// Set up container (must be done here because extensions table may not exist)
|
// Set up container (must be done here because extensions table may not exist)
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder->set_use_extensions(false);
|
$phpbb_container_builder->set_use_extensions(false);
|
||||||
$phpbb_container_builder->set_use_kernel_pass(false);
|
$phpbb_container_builder->set_use_kernel_pass(false);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
|
@@ -120,7 +120,7 @@ $phpbb_class_loader_ext->register();
|
|||||||
|
|
||||||
// Set up container
|
// Set up container
|
||||||
$phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
|
$phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder->set_use_extensions(false);
|
$phpbb_container_builder->set_use_extensions(false);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
$phpbb_container_builder->set_use_custom_pass(false);
|
$phpbb_container_builder->set_use_custom_pass(false);
|
||||||
|
@@ -127,7 +127,7 @@ class install_convert extends module
|
|||||||
// Enable super globals to prevent issues with the new \phpbb\request\request object
|
// Enable super globals to prevent issues with the new \phpbb\request\request object
|
||||||
$request->enable_super_globals();
|
$request->enable_super_globals();
|
||||||
// Create a normal container now
|
// Create a normal container now
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container = $phpbb_container_builder->get_container();
|
$phpbb_container = $phpbb_container_builder->get_container();
|
||||||
|
|
||||||
// Create cache
|
// Create cache
|
||||||
|
@@ -104,7 +104,7 @@ class install_install extends module
|
|||||||
$request->enable_super_globals();
|
$request->enable_super_globals();
|
||||||
|
|
||||||
// Create a normal container now
|
// Create a normal container now
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container = $phpbb_container_builder->get_container();
|
$phpbb_container = $phpbb_container_builder->get_container();
|
||||||
|
|
||||||
// Sets the global variables
|
// Sets the global variables
|
||||||
|
@@ -76,7 +76,7 @@ class install_update extends module
|
|||||||
$request->enable_super_globals();
|
$request->enable_super_globals();
|
||||||
|
|
||||||
// Create a normal container now
|
// Create a normal container now
|
||||||
$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
|
||||||
$phpbb_container_builder->set_dump_container(false);
|
$phpbb_container_builder->set_dump_container(false);
|
||||||
$phpbb_container_builder->set_use_extensions(false);
|
$phpbb_container_builder->set_use_extensions(false);
|
||||||
if (file_exists($phpbb_root_path . 'install/update/new/config'))
|
if (file_exists($phpbb_root_path . 'install/update/new/config'))
|
||||||
|
@@ -16,7 +16,7 @@ namespace phpbb\di;
|
|||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
|
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
|
||||||
|
|
||||||
class container_factory
|
class container_builder
|
||||||
{
|
{
|
||||||
/** @var string phpBB Root Path */
|
/** @var string phpBB Root Path */
|
||||||
protected $phpbb_root_path;
|
protected $phpbb_root_path;
|
||||||
|
@@ -20,7 +20,7 @@ namespace
|
|||||||
protected $config_php;
|
protected $config_php;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpbb\di\container_factory
|
* @var \phpbb\di\container_builder
|
||||||
*/
|
*/
|
||||||
protected $builder;
|
protected $builder;
|
||||||
protected $phpbb_root_path;
|
protected $phpbb_root_path;
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class phpbb_mock_phpbb_di_container_builder extends \phpbb\di\container_factory
|
class phpbb_mock_phpbb_di_container_builder extends \phpbb\di\container_builder
|
||||||
{
|
{
|
||||||
protected function get_container_filename()
|
protected function get_container_filename()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user