You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
if (!$cacheClearerinstanceof CacheClearerInterface) {
45
+
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
thrownew \RuntimeException(sprintf('Unable to write in the "%s" directory', $realCacheDir));
67
101
}
68
102
69
-
if ($filesystem->exists($oldCacheDir)) {
70
-
$filesystem->remove($oldCacheDir);
103
+
if ($this->filesystem->exists($oldCacheDir)) {
104
+
$this->filesystem->remove($oldCacheDir);
71
105
}
72
106
73
-
$kernel = $this->getContainer()->get('kernel');
74
107
$io->comment(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
$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
114
@@ -90,7 +123,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
90
123
$io->comment('Removing old cache directory...');
91
124
}
92
125
93
-
$filesystem->remove($oldCacheDir);
126
+
$this->filesystem->remove($oldCacheDir);
94
127
95
128
if ($output->isVerbose()) {
96
129
$io->comment('Finished');
@@ -101,31 +134,30 @@ protected function execute(InputInterface $input, OutputInterface $output)
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
class CacheWarmupCommand extends ContainerAwareCommand
25
28
{
29
+
private$cacheWarmer;
30
+
31
+
/**
32
+
* @param CacheWarmerAggregate $cacheWarmer
33
+
*/
34
+
publicfunction__construct($cacheWarmer = null)
35
+
{
36
+
parent::__construct();
37
+
38
+
if (!$cacheWarmerinstanceof CacheWarmerAggregate) {
39
+
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
$io->comment(sprintf('Warming up the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
$io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully warmed.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
0 commit comments