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
feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] deprecated cache:clear with warmup
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The warmup part of `cache:clear` does not work well, and does not deliver the guarantee that the generated cache is exactly the same as the one that would have been generated via `cache:warmup`.
As one of the goal of Symfony 4 is to be able to generate all the cache for read-only filsystem, I propose to deprecate the warmup part of `cache:clear` in 3.3 to be able to remove it completely in 4.0. In 4.0, the `--no-warmup` option would be a noop (and can then be removed in 5.0).
Commits
-------
7ed3237 [FrameworkBundle] deprecated cache:clear with warmup
Copy file name to clipboardExpand all lines: UPGRADE-3.3.md
+3
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,9 @@ Finder
123
123
FrameworkBundle
124
124
---------------
125
125
126
+
* The `cache:clear` command should always be called with the `--no-warmup` option.
127
+
Warmup should be done via the `cache:warmup` command.
128
+
126
129
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated. Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
127
130
128
131
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass` class has been
@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);
97
81
98
-
$filesystem->rename($realCacheDir, $oldCacheDir);
99
-
if ('\\' === DIRECTORY_SEPARATOR) {
100
-
sleep(1); // workaround for Windows PHP rename bug
$io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
0 commit comments