Skip to content

Commit b6e95a5

Browse files
committed
[FrameworkBundle] Display a proper warning on cache:clear without the --no-warmup option
1 parent 4d5890b commit b6e95a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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)