Skip to content

Commit

Permalink
Merge pull request #130 from matmarchant/develop
Browse files Browse the repository at this point in the history
Fix the return type for Commands in symfony console in v5.4.24
  • Loading branch information
paulpartington-cti authored Jul 28, 2023
2 parents 58c6774 + bb206f2 commit 76fe8fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Console/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function configure()
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return void
* @return int
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function execute(InputInterface $input, OutputInterface $output)
Expand All @@ -52,6 +52,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
} catch (ConfiguratorAdapterException $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
return Command::FAILURE;
}
return Command::SUCCESS;
}
}
4 changes: 3 additions & 1 deletion Console/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function configure()
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return void
* @return int
* @SuppressWarnings(PHPMD)
*/
protected function execute(InputInterface $input, OutputInterface $output)
Expand Down Expand Up @@ -105,6 +105,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
} catch (\Exception $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
return Command::FAILURE;
}
return Command::SUCCESS;
}
}

0 comments on commit 76fe8fb

Please sign in to comment.