Skip to content

Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)" #23825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions UPGRADE-3.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ Form
FrameworkBundle
---------------

* The `cache:clear` command should always be called with the `--no-warmup` option.
Warmup should be done via the `cache:warmup` command.

* [BC BREAK] The "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies"
parameter have been removed. Use the Request::setTrustedProxies() method in your front controller instead.

Expand Down
3 changes: 0 additions & 3 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,6 @@ Form
FrameworkBundle
---------------

* The `cache:clear` command does not warmup the cache anymore. Warmup should
be done via the `cache:warmup` command.

* The "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter have been removed. Use the `Request::setTrustedProxies()` method in your front controller instead.

* The default value of the `framework.workflows.[name].type` configuration options is now `state_machine`.
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CHANGELOG
the same helpers as the `Controller` class, but does not allow accessing the dependency
injection container, in order to encourage explicit dependency declarations.
* Added support for the `controller.service_arguments` tag, for injecting services into controllers' actions
* Deprecated `cache:clear` with warmup (always call it with `--no-warmup`)
* Changed default configuration for
assets/forms/validation/translation/serialization/csrf from `canBeEnabled()` to
`canBeDisabled()` when Flex is used
Expand Down
10 changes: 0 additions & 10 deletions src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('no-warmup')) {
$filesystem->rename($realCacheDir, $oldCacheDir);
} else {
$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);
}

Expand Down Expand Up @@ -132,8 +126,6 @@ private function warmupCache(InputInterface $input, OutputInterface $output, $re
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
*
* @internal to be removed in 4.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that in 3.4, the command class is @final so we can still make them private in 4.0. I'll take care of it when merging up.

*/
protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true)
{
Expand Down Expand Up @@ -200,8 +192,6 @@ protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = tr
* @param string $warmupDir
*
* @return KernelInterface
*
* @internal to be removed in 4.0
*/
protected function getTempKernel(KernelInterface $parent, $namespace, $parentClass, $warmupDir)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ protected function tearDown()
$this->fs->remove($this->rootDir);
}

/**
* @group legacy
*/
public function testCacheIsFreshAfterCacheClearedWithWarmup()
{
$input = new ArrayInput(array('cache:clear'));
Expand Down