diff --git a/phpBB/composer.json b/phpBB/composer.json index 21b0b5e7ba..1808c4c7c7 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -59,7 +59,7 @@ }, "require-dev": { "fabpot/goutte": "~3.2", - "laravel/homestead": "~7.0", + "laravel/homestead": "~9.4", "phing/phing": "~2.4", "phpunit/dbunit": "~4.0", "phpunit/phpunit": "^7.0", diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php index 511c6bc01b..e105911511 100644 --- a/phpBB/phpbb/console/command/cron/run.php +++ b/phpBB/phpbb/console/command/cron/run.php @@ -14,6 +14,7 @@ namespace phpbb\console\command\cron; use phpbb\exception\runtime_exception; +use Symfony\Component\Console\Command\Command as symfony_command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Output\OutputInterface; @@ -90,7 +91,8 @@ class run extends \phpbb\console\command\command } $this->lock_db->release(); - return $exit_status; + + return !$exit_status ? symfony_command::SUCCESS : symfony_command::FAILURE; } else { diff --git a/phpBB/phpbb/console/command/db/list_command.php b/phpBB/phpbb/console/command/db/list_command.php index edc9222009..4e2b298baa 100644 --- a/phpBB/phpbb/console/command/db/list_command.php +++ b/phpBB/phpbb/console/command/db/list_command.php @@ -85,13 +85,13 @@ class list_command extends \phpbb\console\command\db\migration_command if (!empty($available)) { $io->listing($available); - return symfony_command::SUCCESS; } else { $io->text($this->user->lang('CLI_MIGRATIONS_EMPTY')); $io->newLine(); - return symfony_command::FAILURE; } + + return symfony_command::SUCCESS; } } diff --git a/phpBB/phpbb/console/command/extension/install.php b/phpBB/phpbb/console/command/extension/install.php index 7de0805754..0e59abd212 100644 --- a/phpBB/phpbb/console/command/extension/install.php +++ b/phpBB/phpbb/console/command/extension/install.php @@ -73,7 +73,7 @@ class install extends \phpbb\console\command\command * * @param InputInterface $input * @param OutputInterface $output - * @return integer + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/phpBB/phpbb/console/command/extension/list_available.php b/phpBB/phpbb/console/command/extension/list_available.php index 40f58c372d..1c38b8922f 100644 --- a/phpBB/phpbb/console/command/extension/list_available.php +++ b/phpBB/phpbb/console/command/extension/list_available.php @@ -53,7 +53,7 @@ class list_available extends \phpbb\console\command\command * * @param InputInterface $input * @param OutputInterface $output - * @return integer + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/phpBB/phpbb/console/command/extension/manage.php b/phpBB/phpbb/console/command/extension/manage.php index a287557b04..cb97c6d141 100644 --- a/phpBB/phpbb/console/command/extension/manage.php +++ b/phpBB/phpbb/console/command/extension/manage.php @@ -67,7 +67,7 @@ class manage extends \phpbb\console\command\command * * @param InputInterface $input * @param OutputInterface $output - * @return integer + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php index 2986a3d96c..e825950a19 100644 --- a/phpBB/phpbb/console/command/extension/show.php +++ b/phpBB/phpbb/console/command/extension/show.php @@ -50,7 +50,7 @@ class show extends command if (empty($all)) { $io->note($this->user->lang('CLI_EXTENSION_NOT_FOUND')); - return 3; + return symfony_command::FAILURE; } $enabled = array_keys($this->manager->all_enabled()); diff --git a/phpBB/phpbb/console/command/reparser/list_all.php b/phpBB/phpbb/console/command/reparser/list_all.php index 16b7f50519..ae90c1a68f 100644 --- a/phpBB/phpbb/console/command/reparser/list_all.php +++ b/phpBB/phpbb/console/command/reparser/list_all.php @@ -60,7 +60,7 @@ class list_all extends \phpbb\console\command\command * * @param InputInterface $input * @param OutputInterface $output - * @return integer + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php index daefd4cebc..529035233d 100644 --- a/phpBB/phpbb/console/command/reparser/reparse.php +++ b/phpBB/phpbb/console/command/reparser/reparse.php @@ -127,7 +127,7 @@ class reparse extends \phpbb\console\command\command * * @param InputInterface $input * @param OutputInterface $output - * @return integer + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/phpBB/phpbb/console/command/update/check.php b/phpBB/phpbb/console/command/update/check.php index e7ca92e813..bb9114652a 100644 --- a/phpBB/phpbb/console/command/update/check.php +++ b/phpBB/phpbb/console/command/update/check.php @@ -99,7 +99,7 @@ class check extends \phpbb\console\command\command if (!($stability == 'stable') && !($stability == 'unstable')) { $io->error($this->language->lang('CLI_ERROR_INVALID_STABILITY', $stability)); - return 3; + return symfony_command::FAILURE; } } diff --git a/phpBB/phpbb/install/event/kernel_exception_subscriber.php b/phpBB/phpbb/install/event/kernel_exception_subscriber.php index 60b7d9a400..d4f939dfc6 100644 --- a/phpBB/phpbb/install/event/kernel_exception_subscriber.php +++ b/phpBB/phpbb/install/event/kernel_exception_subscriber.php @@ -20,7 +20,7 @@ use phpbb\template\template; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\ExceptionEvent; use Symfony\Component\HttpFoundation\JsonResponse; /** @@ -60,11 +60,11 @@ class kernel_exception_subscriber implements EventSubscriberInterface /** * This listener is run when the KernelEvents::EXCEPTION event is triggered * - * @param GetResponseForExceptionEvent $event + * @param ExceptionEvent $event */ - public function on_kernel_exception(GetResponseForExceptionEvent $event) + public function on_kernel_exception(ExceptionEvent $event) { - $exception = $event->getException(); + $exception = $event->getThrowable(); $message = $exception->getMessage(); if ($exception instanceof exception_interface) diff --git a/phpBB/phpbb/install/installer_configuration.php b/phpBB/phpbb/install/installer_configuration.php index efd0229571..efa2a922c3 100644 --- a/phpBB/phpbb/install/installer_configuration.php +++ b/phpBB/phpbb/install/installer_configuration.php @@ -26,8 +26,8 @@ class installer_configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('installer'); + $treeBuilder = new TreeBuilder('installer'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() ->arrayNode('admin') diff --git a/phpBB/phpbb/install/updater_configuration.php b/phpBB/phpbb/install/updater_configuration.php index 9795ed2cd9..2afdb44dfc 100644 --- a/phpBB/phpbb/install/updater_configuration.php +++ b/phpBB/phpbb/install/updater_configuration.php @@ -26,8 +26,8 @@ class updater_configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('updater'); + $treeBuilder = new TreeBuilder('updater'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->addDefaultsIfNotSet() ->children() diff --git a/tests/console/user/add_test.php b/tests/console/user/add_test.php index 8cdb706cf6..d70f837e57 100644 --- a/tests/console/user/add_test.php +++ b/tests/console/user/add_test.php @@ -106,7 +106,7 @@ class phpbb_console_user_add_test extends phpbb_console_user_base $this->assertEquals(2, $this->get_user_id('Admin')); - $command_tester->setInputs(['bar\npassword\npassword\nbar@test.com']); + $command_tester->setInputs(['bar', 'password', 'password', 'bar@test.com']); $command_tester->execute(array( 'command' => $this->command_name,