Skip to content

need a way to access the TagHandler to refactor CacheManager in a BC way #178

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

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 6 additions & 1 deletion src/CacheInvalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ class CacheInvalidator
private $eventDispatcher;

/**
* @deprecated This reference is only for BC and will be removed in version 2.0. Do not add
* methods to interact with the TagHandler but promote to use the TagHandler directly.
*
* @var TagHandler
*/
private $tagHandler;
protected $tagHandler;

/**
* @var string
Expand Down Expand Up @@ -115,6 +118,8 @@ public function supports($operation)
* @param EventDispatcherInterface $eventDispatcher
*
* @return $this
*
* @throws \Exception When trying to override the event dispatcher.
*/
public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Handler/TagHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ public function getTagsHeaderValue()
* This must be called before any response is sent to the client.
*
* @param array $tags List of tags to add.
*
* @return $this
*/
public function addTags(array $tags)
{
$this->tags = array_merge($this->tags, $tags);

return $this;
}

/**
Expand Down