From 3dcaa48850bf823b238391fbf9c3f085092010bc Mon Sep 17 00:00:00 2001 From: CHItA Date: Sat, 13 Jun 2015 15:35:19 +0200 Subject: [ticket/13740] Move installer files to phpbb/install directory PHPBB3-13740 --- .../exception/cannot_build_container_exception.php | 22 +++++++ .../installer_config_not_writable_exception.php | 22 +++++++ .../install/exception/installer_exception.php | 22 +++++++ .../install/exception/invalid_dbms_exception.php | 22 +++++++ .../exception/invalid_service_name_exception.php | 69 ++++++++++++++++++++++ .../exception/module_not_found_exception.php | 42 +++++++++++++ .../install/exception/task_not_found_exception.php | 42 +++++++++++++ .../user_interaction_required_exception.php | 25 ++++++++ 8 files changed, 266 insertions(+) create mode 100644 phpBB/phpbb/install/exception/cannot_build_container_exception.php create mode 100644 phpBB/phpbb/install/exception/installer_config_not_writable_exception.php create mode 100644 phpBB/phpbb/install/exception/installer_exception.php create mode 100644 phpBB/phpbb/install/exception/invalid_dbms_exception.php create mode 100644 phpBB/phpbb/install/exception/invalid_service_name_exception.php create mode 100644 phpBB/phpbb/install/exception/module_not_found_exception.php create mode 100644 phpBB/phpbb/install/exception/task_not_found_exception.php create mode 100644 phpBB/phpbb/install/exception/user_interaction_required_exception.php (limited to 'phpBB/phpbb/install/exception') diff --git a/phpBB/phpbb/install/exception/cannot_build_container_exception.php b/phpBB/phpbb/install/exception/cannot_build_container_exception.php new file mode 100644 index 0000000000..11be507bc9 --- /dev/null +++ b/phpBB/phpbb/install/exception/cannot_build_container_exception.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * This exception should be thrown when + */ +class cannot_build_container_exception extends installer_exception +{ + +} diff --git a/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php b/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php new file mode 100644 index 0000000000..3f3b03f178 --- /dev/null +++ b/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * Exception for the event when installer config is not writable to disk + */ +class installer_config_not_writable_exception extends installer_exception +{ + +} diff --git a/phpBB/phpbb/install/exception/installer_exception.php b/phpBB/phpbb/install/exception/installer_exception.php new file mode 100644 index 0000000000..c37950d05c --- /dev/null +++ b/phpBB/phpbb/install/exception/installer_exception.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * Installer's base exception + */ +class installer_exception extends \Exception +{ + +} diff --git a/phpBB/phpbb/install/exception/invalid_dbms_exception.php b/phpBB/phpbb/install/exception/invalid_dbms_exception.php new file mode 100644 index 0000000000..ccb35bc237 --- /dev/null +++ b/phpBB/phpbb/install/exception/invalid_dbms_exception.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * This exception should be thrown when + */ +class invalid_dbms_exception extends installer_exception +{ + +} diff --git a/phpBB/phpbb/install/exception/invalid_service_name_exception.php b/phpBB/phpbb/install/exception/invalid_service_name_exception.php new file mode 100644 index 0000000000..e64cd2026f --- /dev/null +++ b/phpBB/phpbb/install/exception/invalid_service_name_exception.php @@ -0,0 +1,69 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +class invalid_service_name_exception extends installer_exception +{ + /** + * @var string + */ + private $params; + + /** + * @var string + */ + private $error; + + /** + * Constructor + * + * @param string $error The name of the missing installer module + * @param array $params Additional values for message translation + */ + public function __construct($error, $params = array()) + { + $this->error = $error; + $this->params = $params; + } + + /** + * Returns the language entry's name for the error + * + * @return string + */ + public function get_error() + { + return $this->error; + } + + /** + * Returns parameters for the language entry, if there is any + * + * @return array + */ + public function get_params() + { + return $this->params; + } + + /** + * Returns true, if there are any parameters set + * + * @return bool + */ + public function has_params() + { + return (sizeof($this->params) !== 0); + } +} diff --git a/phpBB/phpbb/install/exception/module_not_found_exception.php b/phpBB/phpbb/install/exception/module_not_found_exception.php new file mode 100644 index 0000000000..9fa03fad6e --- /dev/null +++ b/phpBB/phpbb/install/exception/module_not_found_exception.php @@ -0,0 +1,42 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +class module_not_found_exception extends installer_exception +{ + /** + * @var string + */ + private $module_service_name; + + /** + * Constructor + * + * @param string $module_service_name The name of the missing installer module + */ + public function __construct($module_service_name) + { + $this->module_service_name = $module_service_name; + } + + /** + * Returns the missing installer module's service name + * + * @return string + */ + public function get_module_service_name() + { + return $this->module_service_name; + } +} diff --git a/phpBB/phpbb/install/exception/task_not_found_exception.php b/phpBB/phpbb/install/exception/task_not_found_exception.php new file mode 100644 index 0000000000..11486cc6b0 --- /dev/null +++ b/phpBB/phpbb/install/exception/task_not_found_exception.php @@ -0,0 +1,42 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +class task_not_found_exception extends installer_exception +{ + /** + * @var string + */ + private $task_service_name; + + /** + * Constructor + * + * @param string $task_service_name The name of the missing installer module + */ + public function __construct($task_service_name) + { + $this->task_service_name = $task_service_name; + } + + /** + * Returns the missing installer task's service name + * + * @return string + */ + public function get_task_service_name() + { + return $this->task_service_name; + } +} diff --git a/phpBB/phpbb/install/exception/user_interaction_required_exception.php b/phpBB/phpbb/install/exception/user_interaction_required_exception.php new file mode 100644 index 0000000000..d65a448841 --- /dev/null +++ b/phpBB/phpbb/install/exception/user_interaction_required_exception.php @@ -0,0 +1,25 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * This exception should be thrown when user interaction is inevitable + * + * Note: Please note that the output should already be setup for the user + * when you use throw this exception + */ +class user_interaction_required_exception extends installer_exception +{ + +} -- cgit v1.2.1 From c53ce3d5fbfcdc9924426aee74fb1097138a8a42 Mon Sep 17 00:00:00 2001 From: CHItA Date: Wed, 17 Jun 2015 11:00:07 +0200 Subject: [ticket/13740] Fix CS and extend phpbb extensions [ci skip] PHPBB3-13740 --- .../install/exception/installer_exception.php | 4 +- .../exception/invalid_service_name_exception.php | 50 ---------------------- 2 files changed, 3 insertions(+), 51 deletions(-) (limited to 'phpBB/phpbb/install/exception') diff --git a/phpBB/phpbb/install/exception/installer_exception.php b/phpBB/phpbb/install/exception/installer_exception.php index c37950d05c..f17dca8f17 100644 --- a/phpBB/phpbb/install/exception/installer_exception.php +++ b/phpBB/phpbb/install/exception/installer_exception.php @@ -13,10 +13,12 @@ namespace phpbb\install\exception; +use phpbb\exception\runtime_exception; + /** * Installer's base exception */ -class installer_exception extends \Exception +class installer_exception extends runtime_exception { } diff --git a/phpBB/phpbb/install/exception/invalid_service_name_exception.php b/phpBB/phpbb/install/exception/invalid_service_name_exception.php index e64cd2026f..dff4873f3c 100644 --- a/phpBB/phpbb/install/exception/invalid_service_name_exception.php +++ b/phpBB/phpbb/install/exception/invalid_service_name_exception.php @@ -15,55 +15,5 @@ namespace phpbb\install\exception; class invalid_service_name_exception extends installer_exception { - /** - * @var string - */ - private $params; - /** - * @var string - */ - private $error; - - /** - * Constructor - * - * @param string $error The name of the missing installer module - * @param array $params Additional values for message translation - */ - public function __construct($error, $params = array()) - { - $this->error = $error; - $this->params = $params; - } - - /** - * Returns the language entry's name for the error - * - * @return string - */ - public function get_error() - { - return $this->error; - } - - /** - * Returns parameters for the language entry, if there is any - * - * @return array - */ - public function get_params() - { - return $this->params; - } - - /** - * Returns true, if there are any parameters set - * - * @return bool - */ - public function has_params() - { - return (sizeof($this->params) !== 0); - } } -- cgit v1.2.1 From 62103cec300ddadb904862ee2a74d68f71eb32ca Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Thu, 9 Jul 2015 15:26:48 +0200 Subject: [ticket/13740] Use service collection instead of array of task names PHPBB3-13740 --- .../exception/module_not_found_exception.php | 42 ---------------------- .../exception/resource_limit_reached_exception.php | 19 ++++++++++ .../install/exception/task_not_found_exception.php | 42 ---------------------- 3 files changed, 19 insertions(+), 84 deletions(-) delete mode 100644 phpBB/phpbb/install/exception/module_not_found_exception.php create mode 100644 phpBB/phpbb/install/exception/resource_limit_reached_exception.php delete mode 100644 phpBB/phpbb/install/exception/task_not_found_exception.php (limited to 'phpBB/phpbb/install/exception') diff --git a/phpBB/phpbb/install/exception/module_not_found_exception.php b/phpBB/phpbb/install/exception/module_not_found_exception.php deleted file mode 100644 index 9fa03fad6e..0000000000 --- a/phpBB/phpbb/install/exception/module_not_found_exception.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @license GNU General Public License, version 2 (GPL-2.0) - * - * For full copyright and license information, please see - * the docs/CREDITS.txt file. - * - */ - -namespace phpbb\install\exception; - -class module_not_found_exception extends installer_exception -{ - /** - * @var string - */ - private $module_service_name; - - /** - * Constructor - * - * @param string $module_service_name The name of the missing installer module - */ - public function __construct($module_service_name) - { - $this->module_service_name = $module_service_name; - } - - /** - * Returns the missing installer module's service name - * - * @return string - */ - public function get_module_service_name() - { - return $this->module_service_name; - } -} diff --git a/phpBB/phpbb/install/exception/resource_limit_reached_exception.php b/phpBB/phpbb/install/exception/resource_limit_reached_exception.php new file mode 100644 index 0000000000..0b841747e6 --- /dev/null +++ b/phpBB/phpbb/install/exception/resource_limit_reached_exception.php @@ -0,0 +1,19 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +class resource_limit_reached_exception extends installer_exception +{ + +} diff --git a/phpBB/phpbb/install/exception/task_not_found_exception.php b/phpBB/phpbb/install/exception/task_not_found_exception.php deleted file mode 100644 index 11486cc6b0..0000000000 --- a/phpBB/phpbb/install/exception/task_not_found_exception.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @license GNU General Public License, version 2 (GPL-2.0) - * - * For full copyright and license information, please see - * the docs/CREDITS.txt file. - * - */ - -namespace phpbb\install\exception; - -class task_not_found_exception extends installer_exception -{ - /** - * @var string - */ - private $task_service_name; - - /** - * Constructor - * - * @param string $task_service_name The name of the missing installer module - */ - public function __construct($task_service_name) - { - $this->task_service_name = $task_service_name; - } - - /** - * Returns the missing installer task's service name - * - * @return string - */ - public function get_task_service_name() - { - return $this->task_service_name; - } -} -- cgit v1.2.1 From b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Tue, 21 Jul 2015 14:42:15 +0200 Subject: [ticket/13740] Fix CS and docblocks PHPBB3-13740 --- .../exception/cannot_build_container_exception.php | 2 +- .../installer_config_not_writable_exception.php | 2 +- .../install/exception/invalid_dbms_exception.php | 2 +- .../exception/invalid_service_name_exception.php | 19 ------------------- .../exception/resource_limit_reached_exception.php | 3 +++ 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 phpBB/phpbb/install/exception/invalid_service_name_exception.php (limited to 'phpBB/phpbb/install/exception') diff --git a/phpBB/phpbb/install/exception/cannot_build_container_exception.php b/phpBB/phpbb/install/exception/cannot_build_container_exception.php index 11be507bc9..6cf12b008b 100644 --- a/phpBB/phpbb/install/exception/cannot_build_container_exception.php +++ b/phpBB/phpbb/install/exception/cannot_build_container_exception.php @@ -14,7 +14,7 @@ namespace phpbb\install\exception; /** - * This exception should be thrown when + * Thrown when the container cannot be built */ class cannot_build_container_exception extends installer_exception { diff --git a/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php b/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php index 3f3b03f178..51864c5dca 100644 --- a/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php +++ b/phpBB/phpbb/install/exception/installer_config_not_writable_exception.php @@ -14,7 +14,7 @@ namespace phpbb\install\exception; /** - * Exception for the event when installer config is not writable to disk + * Thrown when installer config is not writable to disk */ class installer_config_not_writable_exception extends installer_exception { diff --git a/phpBB/phpbb/install/exception/invalid_dbms_exception.php b/phpBB/phpbb/install/exception/invalid_dbms_exception.php index ccb35bc237..38de5f613a 100644 --- a/phpBB/phpbb/install/exception/invalid_dbms_exception.php +++ b/phpBB/phpbb/install/exception/invalid_dbms_exception.php @@ -14,7 +14,7 @@ namespace phpbb\install\exception; /** - * This exception should be thrown when + * Thrown when an unavailable DBMS has been selected */ class invalid_dbms_exception extends installer_exception { diff --git a/phpBB/phpbb/install/exception/invalid_service_name_exception.php b/phpBB/phpbb/install/exception/invalid_service_name_exception.php deleted file mode 100644 index dff4873f3c..0000000000 --- a/phpBB/phpbb/install/exception/invalid_service_name_exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @license GNU General Public License, version 2 (GPL-2.0) - * - * For full copyright and license information, please see - * the docs/CREDITS.txt file. - * - */ - -namespace phpbb\install\exception; - -class invalid_service_name_exception extends installer_exception -{ - -} diff --git a/phpBB/phpbb/install/exception/resource_limit_reached_exception.php b/phpBB/phpbb/install/exception/resource_limit_reached_exception.php index 0b841747e6..025e09fbd3 100644 --- a/phpBB/phpbb/install/exception/resource_limit_reached_exception.php +++ b/phpBB/phpbb/install/exception/resource_limit_reached_exception.php @@ -13,6 +13,9 @@ namespace phpbb\install\exception; +/** + * Thrown when the installer is out of memory or time + */ class resource_limit_reached_exception extends installer_exception { -- cgit v1.2.1 From 8f5a0ad6f73e7b7757b02c827436384c96069b5a Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Fri, 24 Jul 2015 09:20:50 +0200 Subject: [ticket/14039] Revamp updater PHPBB3-14039 --- .../exception/file_updater_failure_exception.php | 22 +++++++++++ .../exception/jump_to_restart_point_exception.php | 44 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 phpBB/phpbb/install/exception/file_updater_failure_exception.php create mode 100644 phpBB/phpbb/install/exception/jump_to_restart_point_exception.php (limited to 'phpBB/phpbb/install/exception') diff --git a/phpBB/phpbb/install/exception/file_updater_failure_exception.php b/phpBB/phpbb/install/exception/file_updater_failure_exception.php new file mode 100644 index 0000000000..46ba2ed32d --- /dev/null +++ b/phpBB/phpbb/install/exception/file_updater_failure_exception.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +/** + * Thrown when the file updater fails + */ +class file_updater_failure_exception extends installer_exception +{ + +} diff --git a/phpBB/phpbb/install/exception/jump_to_restart_point_exception.php b/phpBB/phpbb/install/exception/jump_to_restart_point_exception.php new file mode 100644 index 0000000000..b628c4fbe3 --- /dev/null +++ b/phpBB/phpbb/install/exception/jump_to_restart_point_exception.php @@ -0,0 +1,44 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\exception; + +class jump_to_restart_point_exception extends installer_exception +{ + /** + * @var string + */ + protected $restart_point_name; + + /** + * Constructor + * + * @param string $restart_point_name + */ + public function __construct($restart_point_name) + { + $this->restart_point_name = $restart_point_name; + + parent::__construct(); + } + + /** + * Returns the restart point's name + * + * @return string + */ + public function get_restart_point_name() + { + return $this->restart_point_name; + } +} -- cgit v1.2.1