From 892fb38778070e420e54b8ef00546996d9c5bbac Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Sun, 26 Jan 2020 15:41:48 -0600 Subject: [PATCH] Add support for Symfony 5 --- Command/Cleanup.php | 2 +- Command/LocalSetup.php | 4 ++-- Command/LocalUpdate.php | 6 +++--- Command/Purge.php | 4 ++-- composer.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Command/Cleanup.php b/Command/Cleanup.php index 3177101..c9f3d08 100644 --- a/Command/Cleanup.php +++ b/Command/Cleanup.php @@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { if ($confirmation != 'delete') { print "Clean up aborted.\n"; - return; + return 0; } $master_branch_name = $master_branch->getBranchName(); diff --git a/Command/LocalSetup.php b/Command/LocalSetup.php index c4b5482..0289753 100644 --- a/Command/LocalSetup.php +++ b/Command/LocalSetup.php @@ -63,7 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln("Afterwards, you should use the update command to get new patches from drupal.org."); } - return; + return 0; } // If the master branch is not current, abort. @@ -89,7 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // If no patches, we're done. if (empty($patches)) { $output->writeln("There are no patches to apply."); - return; + return 0; } // Output the patches. diff --git a/Command/LocalUpdate.php b/Command/LocalUpdate.php index 0737cd6..e6d64c8 100644 --- a/Command/LocalUpdate.php +++ b/Command/LocalUpdate.php @@ -59,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // If no patches, we're done. if (empty($patches)) { print "No patches to apply.\n"; - return; + return 0; } $patches_uncommitted = []; @@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // If no uncommitted patches, we're done. if (empty($patches_uncommitted)) { print "No patches to apply; existing patches are already applied to this feature branch.\n"; - return; + return 0; } // If the feature branch's SHA is not the same as the last committed patch @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // If all the patches were already committed, we're done. if (empty($patches_committed)) { print "No new patches to apply.\n"; - return; + return 0; } // If final patch didn't apply, then output a message: the latest patch diff --git a/Command/Purge.php b/Command/Purge.php index 7f0fb24..e3950bb 100644 --- a/Command/Purge.php +++ b/Command/Purge.php @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { if (empty($issues_to_clean_up)) { print "No branches to clean up.\n"; - return; + return 0; } // Sort by issue number. @@ -102,7 +102,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $question = new Question("Please enter 'delete' to confirm DELETION of {$count} branches:"); if ($helper->ask($input, $output, $question) != 'delete') { $output->writeln('Clean up aborted.'); - return; + return 0; } foreach ($issues_to_clean_up as $issue_number => $info) { diff --git a/composer.json b/composer.json index 8307f16..be23ec4 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,8 @@ "homepage": "https://github.com/joachim-n/dorgflow", "license": "GPL-2.0+", "require": { - "symfony/dependency-injection": ">=3.2 <5", - "symfony/console": ">=3.2 <5" + "symfony/dependency-injection": ">=3.2", + "symfony/console": ">=3.2" }, "require-dev": { "phpunit/phpunit": ">=6.0",