-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] deprecated cache:clear with warmup #21038
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
Conversation
UPGRADE-3.3.md
Outdated
FrameworkBundle | ||
--------------- | ||
|
||
* The cache:clear command should always be called the --no-warmup option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "without"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant "with".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} | ||
$filesystem->remove($warmupDir); | ||
} | ||
@trigger_error('Calling cache:clear without the --no-warmup option is deprecated version 3.3. Cache warmup should be done with the cache:warmup command instead.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "since"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
dffd2fc
to
d0b43d8
Compare
@fabpot is the deprecation notice really needed though? I mean it can be a info/warning log message on behavior change as well right? And perhaps dont log anything in non-quiet mode, but display it to the user instead. Meaning we could deprecate Point is; half the internet does |
This looks like a good idea to me |
I was talking about the deprecation of the warmup part. But @ro0NL is right about deprecations by default though |
I know for sure i wouldnt care about the deprecation; it would work rather confusing instead, ie; I must/should run cache:warmup now to upgrade properly? While we're actually trying to separate things, and let users decide. Hence, it should be informational imo.
Not sure though, as removing it is not the right upgrade path till 4.0.. tough one :) edit: yep.. we should definitely deprecate |
Now im not even sure we should log/display anything opposed to adding a changelog note? Doing it in code kinda implies "people dont read changelogs" ;-) We could just drop it, right? |
d565d18
to
d8b0c2c
Compare
d8b0c2c
to
e9533f0
Compare
Just dropping the flag won't work as it would break people using it currently. I don't see any other better way. |
e9533f0
to
7ed3237
Compare
I'm going to merge it as is. We will have 2 months to tweak the message if needed. |
…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
…clear with warmup (fabpot)" (nicolas-grekas) This PR was merged into the 3.3 branch. Discussion ---------- Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)" This reverts commit 3495b35, reversing changes made to 7f7b897. | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21038 | License | MIT | Doc PR | - Sibling to #23792: there is no need to trigger the deprecation in 3.3 if we un-deprecate in 3.4. Commits ------- 9009970 Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
* 3.3: Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
* 3.4: [HttpKernel][FrameworkBundle] Add RebootableInterface, fix and un-deprecate cache:clear with warmup [DI] Fix merging of env vars in configs Allow to get alternatives when ServiceNotFoundException occurs. [DI] Rererence parameter arrays when possible Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
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 viacache: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).