From 88fdda3fd88221c13959d76ce99da1815e3efa88 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Mon, 12 Jun 2017 08:17:41 +0200 Subject: [PATCH] Updated for current Symfony (3.2) --- .../eZ/Publish/ProfilerBundle/Command/ProfileCommand.php | 6 ++++-- .../eZ/Publish/ProfilerBundle/Resources/config/services.xml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/php/eZ/Publish/ProfilerBundle/Command/ProfileCommand.php b/src/php/eZ/Publish/ProfilerBundle/Command/ProfileCommand.php index 1ed39fa..59c4efb 100644 --- a/src/php/eZ/Publish/ProfilerBundle/Command/ProfileCommand.php +++ b/src/php/eZ/Publish/ProfilerBundle/Command/ProfileCommand.php @@ -7,6 +7,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; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; @@ -53,13 +54,14 @@ protected function execute(InputInterface $input, OutputInterface $output) { $executor = $this->getContainer()->get('ezpublish.profiler.executor.' . $input->getArgument('target')); - $dialog = $this->getHelper('dialog'); + $dialog = $this->getHelper('question'); if ($input->getOption('seed')) { mt_srand($input->getOption('seed')); } + $question = new ConfirmationQuestion('Really run the profiler? This will reset the database.', false); if (!$input->getOption('yes') && - !$dialog->askConfirmation($output, "Really run the profiler? This will reset the database.", false)) { + !$dialog->ask($input, $output, $question)) { return 1; } diff --git a/src/php/eZ/Publish/ProfilerBundle/Resources/config/services.xml b/src/php/eZ/Publish/ProfilerBundle/Resources/config/services.xml index 5c74043..0c884e8 100644 --- a/src/php/eZ/Publish/ProfilerBundle/Resources/config/services.xml +++ b/src/php/eZ/Publish/ProfilerBundle/Resources/config/services.xml @@ -71,9 +71,9 @@ +