From 6cd188bd726746e473ea106568863e187143d181 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Thu, 29 Jun 2017 20:05:44 +0200 Subject: [PATCH] [FrameworkBundle] Display a proper warning on cache:clear without the --no-warmup option --- .../Bundle/FrameworkBundle/Command/CacheClearCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index 8f740c63178b..2331afecb4e8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -77,7 +77,11 @@ protected function execute(InputInterface $input, OutputInterface $output) if ($input->getOption('no-warmup')) { $filesystem->rename($realCacheDir, $oldCacheDir); } else { - @trigger_error('Calling cache:clear without the --no-warmup option is deprecated since version 3.3. Cache warmup should be done with the cache:warmup command instead.', E_USER_DEPRECATED); + $warning = 'Calling cache:clear without the --no-warmup option is deprecated since version 3.3. Cache warmup should be done with the cache:warmup command instead.'; + + @trigger_error($warning, E_USER_DEPRECATED); + + $io->warning($warning); $this->warmupCache($input, $output, $realCacheDir, $oldCacheDir); }