-
Notifications
You must be signed in to change notification settings - Fork 351
Deprecating FormatCacheClearerCompilerPass #8037
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
base: 2.6
Are you sure you want to change the base?
Conversation
src/Sulu/Bundle/MediaBundle/Media/FormatCache/FormatCacheClearerInterface.php
Outdated
Show resolved
Hide resolved
/** | ||
* @param iterable<string, FormatCacheInterface> $caches | ||
*/ | ||
public function __construct(iterable $caches = []) | ||
{ | ||
$this->caches = [...$caches]; | ||
} | ||
|
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.
This is always an empty array on this branch or I'm missing something?
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.
Yes this is correct because otherwise it would have the cache clearer twice once from the constructor and once from the add
calls. In 3.0 this will be non empty.
40fffe0
to
ab94f93
Compare
Would deprecate the add method also, but only as phpdoc as it still called in core. |
ab94f93
to
9d6045f
Compare
@alexander-schranz Done, should I also apply these changes to the other PRs that deprecate compiler passes? |
What's in this PR?
Deprecating the
FormatCacheClearerCompilerPass
and auto registering all classes that implement theCacheClearCompilerPass
interface.Why?
Symfony already implements this feature. Why not use it?
Example Usage