Skip to content

Commit 6cd188b

Browse files
committed
[FrameworkBundle] Display a proper warning on cache:clear without the --no-warmup option
1 parent 7093fc1 commit 6cd188b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
7777
if ($input->getOption('no-warmup')) {
7878
$filesystem->rename($realCacheDir, $oldCacheDir);
7979
} else {
80-
@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);
80+
$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.';
81+
82+
@trigger_error($warning, E_USER_DEPRECATED);
83+
84+
$io->warning($warning);
8185

8286
$this->warmupCache($input, $output, $realCacheDir, $oldCacheDir);
8387
}

0 commit comments

Comments
 (0)