diff --git a/phpBB/phpbb/install/console/command/install/config/show.php b/phpBB/phpbb/install/console/command/install/config/show.php index 58ad7397da..7daede1b04 100644 --- a/phpBB/phpbb/install/console/command/install/config/show.php +++ b/phpBB/phpbb/install/console/command/install/config/show.php @@ -18,6 +18,7 @@ use phpbb\install\installer_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -90,7 +91,7 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message(array('MISSING_FILE', $config_file)); - return 1; + return Command::FAILURE; } try @@ -101,7 +102,7 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_YAML_FILE'); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -115,11 +116,11 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $style->block(Yaml::dump(array('installer' => $config), 10, 4, true, false)); - return 0; + return Command::SUCCESS; } } diff --git a/phpBB/phpbb/install/console/command/install/config/validate.php b/phpBB/phpbb/install/console/command/install/config/validate.php index 0b8a28beaa..eb638ad387 100644 --- a/phpBB/phpbb/install/console/command/install/config/validate.php +++ b/phpBB/phpbb/install/console/command/install/config/validate.php @@ -18,6 +18,7 @@ use phpbb\install\installer_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -90,7 +91,7 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message(array('MISSING_FILE', array($config_file))); - return 1; + return Command::FAILURE; } try @@ -101,7 +102,7 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_YAML_FILE'); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -115,10 +116,10 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $iohandler->add_success_message('CONFIGURATION_VALID'); - return 0; + return Command::SUCCESS; } } diff --git a/phpBB/phpbb/install/console/command/install/install.php b/phpBB/phpbb/install/console/command/install/install.php index e50eeeb5bc..1ad4ea8114 100644 --- a/phpBB/phpbb/install/console/command/install/install.php +++ b/phpBB/phpbb/install/console/command/install/install.php @@ -22,6 +22,7 @@ use phpbb\install\installer_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -111,14 +112,14 @@ class install extends \phpbb\console\command\command { $iohandler->add_error_message('INSTALL_PHPBB_INSTALLED'); - return 1; + return Command::FAILURE; } if (!is_file($config_file)) { $iohandler->add_error_message(array('MISSING_FILE', $config_file)); - return 1; + return Command::FAILURE; } try @@ -129,7 +130,7 @@ class install extends \phpbb\console\command\command { $iohandler->add_error_message(array('INVALID_YAML_FILE', $config_file)); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -143,7 +144,7 @@ class install extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $this->register_configuration($iohandler, $config); @@ -151,12 +152,12 @@ class install extends \phpbb\console\command\command try { $this->installer->run(); - return 0; + return Command::SUCCESS; } catch (installer_exception $e) { $iohandler->add_error_message($e->getMessage()); - return 1; + return Command::FAILURE; } } diff --git a/phpBB/phpbb/install/console/command/update/config/show.php b/phpBB/phpbb/install/console/command/update/config/show.php index 138c5cae28..df7a69ed31 100644 --- a/phpBB/phpbb/install/console/command/update/config/show.php +++ b/phpBB/phpbb/install/console/command/update/config/show.php @@ -18,6 +18,7 @@ use phpbb\install\updater_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -90,7 +91,7 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message(array('MISSING_FILE', $config_file)); - return 1; + return Command::FAILURE; } try @@ -101,7 +102,7 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_YAML_FILE'); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -115,11 +116,11 @@ class show extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $style->block(Yaml::dump(array('updater' => $config), 10, 4, true, false)); - return 0; + return Command::SUCCESS; } } diff --git a/phpBB/phpbb/install/console/command/update/config/validate.php b/phpBB/phpbb/install/console/command/update/config/validate.php index 8a0d963ac2..eb1a48546f 100644 --- a/phpBB/phpbb/install/console/command/update/config/validate.php +++ b/phpBB/phpbb/install/console/command/update/config/validate.php @@ -18,6 +18,7 @@ use phpbb\install\updater_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -90,7 +91,7 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message(array('MISSING_FILE', array($config_file))); - return 1; + return Command::FAILURE; } try @@ -101,7 +102,7 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_YAML_FILE'); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -115,10 +116,10 @@ class validate extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $iohandler->add_success_message('CONFIGURATION_VALID'); - return 0; + return Command::SUCCESS; } } diff --git a/phpBB/phpbb/install/console/command/update/update.php b/phpBB/phpbb/install/console/command/update/update.php index d6e89b2477..f3320d358b 100644 --- a/phpBB/phpbb/install/console/command/update/update.php +++ b/phpBB/phpbb/install/console/command/update/update.php @@ -22,6 +22,7 @@ use phpbb\install\updater_configuration; use phpbb\language\language; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -111,14 +112,14 @@ class update extends \phpbb\console\command\command { $iohandler->add_error_message('INSTALL_PHPBB_NOT_INSTALLED'); - return 1; + return Command::FAILURE; } if (!is_file($config_file)) { $iohandler->add_error_message(array('MISSING_FILE', $config_file)); - return 1; + return Command::FAILURE; } try @@ -129,7 +130,7 @@ class update extends \phpbb\console\command\command { $iohandler->add_error_message(array('INVALID_YAML_FILE', $config_file)); - return 1; + return Command::FAILURE; } $processor = new Processor(); @@ -143,7 +144,7 @@ class update extends \phpbb\console\command\command { $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage()); - return 1; + return Command::FAILURE; } $this->register_configuration($iohandler, $config); @@ -151,12 +152,12 @@ class update extends \phpbb\console\command\command try { $this->installer->run(); - return 0; + return Command::SUCCESS; } catch (installer_exception $e) { $iohandler->add_error_message($e->getMessage()); - return 1; + return Command::FAILURE; } }