aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/app.php7
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rwxr-xr-x[-rw-r--r--]phpBB/install/phpbbcli.php4
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/install/startup.php45
5 files changed, 53 insertions, 7 deletions
diff --git a/phpBB/install/app.php b/phpBB/install/app.php
index 9346351aba..9664f92cf1 100644
--- a/phpBB/install/app.php
+++ b/phpBB/install/app.php
@@ -30,7 +30,6 @@ $phpbb_filesystem = $phpbb_installer_container->get('filesystem');
/** @var \phpbb\template\template $template */
$template = $phpbb_installer_container->get('template');
-
// Path to templates
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
$paths = array_filter($paths, 'is_dir');
@@ -42,17 +41,17 @@ $template->set_custom_style(array(
),
), $paths);
-/* @var $phpbb_dispatcher \phpbb\event\dispatcher */
+/** @var $phpbb_dispatcher \phpbb\event\dispatcher */
$phpbb_dispatcher = $phpbb_installer_container->get('dispatcher');
/** @var \phpbb\language\language $language */
$language = $phpbb_installer_container->get('language');
$language->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
-/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
+/** @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
$http_kernel = $phpbb_installer_container->get('http_kernel');
-/* @var $symfony_request \phpbb\symfony_request */
+/** @var $symfony_request \phpbb\symfony_request */
$symfony_request = $phpbb_installer_container->get('symfony_request');
$response = $http_kernel->handle($symfony_request);
$response->send();
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 30ff5119ab..9949c972d9 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.1.6',
+ 'phpbb_version' => '3.2.0-a1',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php
index ecdb66ade3..e36922f1a5 100644..100755
--- a/phpBB/install/phpbbcli.php
+++ b/phpBB/install/phpbbcli.php
@@ -12,6 +12,8 @@
*
*/
+use Symfony\Component\Console\Input\ArgvInput;
+
if (php_sapi_name() !== 'cli')
{
echo 'This program must be run from the command line.' . PHP_EOL;
@@ -31,6 +33,8 @@ $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startu
$startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx;
require($startup_path);
+$input = new ArgvInput();
+
/** @var \phpbb\filesystem\filesystem $phpbb_filesystem */
$phpbb_filesystem = $phpbb_installer_container->get('filesystem');
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 680341b855..5cf5af6ddc 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -275,7 +275,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-a1-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-a2-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php
index 766f6be38a..0d3e01efaa 100644
--- a/phpBB/install/startup.php
+++ b/phpBB/install/startup.php
@@ -47,6 +47,48 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
}
}
+function installer_msg_handler($errno, $msg_text, $errfile, $errline)
+{
+ global $phpbb_installer_container;
+
+ switch ($errno)
+ {
+ case E_NOTICE:
+ case E_WARNING:
+ case E_USER_WARNING:
+ case E_USER_NOTICE:
+ $msg = '[phpBB debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline;
+
+ try
+ {
+ /** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */
+ $iohandler = $phpbb_installer_container->get('installer.helper.iohandler');
+ $iohandler->add_warning_message($msg);
+ }
+ catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e)
+ {
+ print ($msg);
+ }
+ break;
+ case E_USER_ERROR:
+ $msg = '<b>General Error:</b><br />' . $msg_text . '<br /> in file ' . $errfile . ' on line ' . $errline;
+
+ $backtrace = get_backtrace();
+ if ($backtrace)
+ {
+ $msg .= '<br /><br />BACKTRACE<br />' . $backtrace;
+ }
+
+ throw new \phpbb\exception\runtime_exception($msg);
+ break;
+ case E_DEPRECATED:
+ return true;
+ break;
+ }
+
+ return false;
+}
+
phpbb_require_updated('includes/startup.' . $phpEx, $phpbb_root_path);
phpbb_require_updated('phpbb/class_loader.' . $phpEx, $phpbb_root_path);
@@ -69,7 +111,7 @@ phpbb_require_updated('includes/functions_user.' . $phpEx, $phpbb_root_path);
phpbb_require_updated('includes/utf/utf_tools.' . $phpEx, $phpbb_root_path);
// Set PHP error handler to ours
-set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
+set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'installer_msg_handler');
$phpbb_installer_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
$phpbb_installer_container_builder
@@ -81,4 +123,5 @@ $config_path = (file_exists($other_config_path . '/installer/config.yml')) ? $ot
$phpbb_installer_container = $phpbb_installer_container_builder
->with_config_path($config_path)
+ ->with_custom_parameters(array('cache.driver.class' => 'phpbb\cache\driver\file'))
->get_container();