diff --git a/Command/DeleteCommand.php b/Command/DeleteCommand.php
index 8b9d1124..fa7428d0 100644
--- a/Command/DeleteCommand.php
+++ b/Command/DeleteCommand.php
@@ -6,6 +6,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Question\ConfirmationQuestion;
/**
* Command to delete a queue
@@ -32,8 +33,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
$noConfirmation = (bool) $input->getOption('no-confirmation');
if (!$noConfirmation && $input->isInteractive()) {
- $confirmation = $this->getHelper('dialog')->askConfirmation($output, sprintf('Are you sure you wish to delete "%s" consumer\'s queue?(y/n)', $input->getArgument('name')), false);
- if (!$confirmation) {
+ $question = new ConfirmationQuestion(
+ sprintf(
+ 'Are you sure you wish to delete "%s" consumer\'s queue? (y/n)',
+ $input->getArgument('name')
+ ),
+ false
+ );
+
+ if (!$this->getHelper('question')->ask($input, $output, $question)) {
$output->writeln('Deletion cancelled!');
return 1;
diff --git a/Command/PurgeConsumerCommand.php b/Command/PurgeConsumerCommand.php
index 972c4093..c90356eb 100644
--- a/Command/PurgeConsumerCommand.php
+++ b/Command/PurgeConsumerCommand.php
@@ -6,6 +6,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Question\ConfirmationQuestion;
/**
* Command to purge a queue
@@ -32,8 +33,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
$noConfirmation = (bool) $input->getOption('no-confirmation');
if (!$noConfirmation && $input->isInteractive()) {
- $confirmation = $this->getHelper('dialog')->askConfirmation($output, sprintf('Are you sure you wish to purge "%s" queue? (y/n)', $input->getArgument('name')), false);
- if (!$confirmation) {
+ $question = new ConfirmationQuestion(
+ sprintf(
+ 'Are you sure you wish to purge "%s" queue? (y/n)',
+ $input->getArgument('name')
+ ),
+ false
+ );
+
+ if (!$this->getHelper('question')->ask($input, $output, $question)) {
$output->writeln('Purging cancelled!');
return 1;