diff options
author | Andreas Fischer <bantu@phpbb.com> | 2014-07-11 11:49:51 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2014-07-11 11:49:51 +0200 |
commit | b2a883d504d9ece8525fcc1a4aa8e44a000db6ca (patch) | |
tree | 81a85d5242913fa7e667b5adc873bd4a500ed406 /phpBB/bin/phpbbcli.php | |
parent | 147b942e5c885f13181f0cb4d67cb4ccee4652df (diff) | |
parent | 58a52fe5b90215d090ba3b992f96d401d805440c (diff) | |
download | forums-b2a883d504d9ece8525fcc1a4aa8e44a000db6ca.tar forums-b2a883d504d9ece8525fcc1a4aa8e44a000db6ca.tar.gz forums-b2a883d504d9ece8525fcc1a4aa8e44a000db6ca.tar.bz2 forums-b2a883d504d9ece8525fcc1a4aa8e44a000db6ca.tar.xz forums-b2a883d504d9ece8525fcc1a4aa8e44a000db6ca.zip |
Merge pull request #2671 from Nicofuma/ticket/12775
[ticket/12775] Replace functions_container with a container_builder class.
* Nicofuma/ticket/12775: (34 commits)
[ticket/12775] Set dbal.conn.driver as synthetic during installation
[ticket/12775] Add the definition of dbal.conn in fixtures/config/services.yml
[ticket/12775] Inject the connection when created in the container
[ticket/12775] Extract the vars later in install/install_update.php
[ticket/12775] Rename config_php_handler to config_php_file container_builder
[ticket/12775] Set defined_vars as a property of config_php_file
[ticket/12775] Fix doc blocks in the container builder
[ticket/12775] Remove useless includes of config.php
[ticket/12775] Move phpbb_convert_30_dbms_to_31 into the config file class
[ticket/12775] Fix comments
[ticket/12775] Update doc blocks
[ticket/12775] Fix container_builder
[ticket/12775] Rename config_php to config_php_file
[ticket/12775] Renamed to \phpbb\di\container_builder
[ticket/12775] Remove the last include of functions_container
[ticket/12775] Fix unit tests
[ticket/12775] Add tests for \phpbb\config_php
[ticket/12775] Add tests for the container factory
[ticket/12775] Use a field instead of a local var in load_config_var()
[ticket/12775] Update container and config in install/
...
Diffstat (limited to 'phpBB/bin/phpbbcli.php')
-rwxr-xr-x | phpBB/bin/phpbbcli.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 8b8d8e43fd..c8098094a2 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -22,20 +22,27 @@ define('IN_PHPBB', true); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'includes/startup.' . $phpEx); -require($phpbb_root_path . 'config.' . $phpEx); +require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); + +$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); +$phpbb_class_loader->register(); + +$phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); +extract($phpbb_config_php_file->get_all()); + require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); -require($phpbb_root_path . 'includes/functions_container.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); -require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); -$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); -$phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); +$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_dump_container(false); + +$phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); |