Skip to content

Commit

Permalink
feature #19515 [Cache] Drop TaggedCacheItemInterface (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Drop TaggedCacheItemInterface

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Introducing this interface was a mistake, we should drop it: the CacheItem class is final, and it can be instantiated only through a cache adapter. Which means there is no way to reuse this interface in any meaningful way as far as extensibility/interoperability is concerned.

Commits
-------

624890b [Cache] Drop TaggedCacheItemInterface
  • Loading branch information
fabpot committed Aug 13, 2016
2 parents f208ac8 + 624890b commit 5cc9ed2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 36 deletions.
11 changes: 9 additions & 2 deletions src/Symfony/Component/Cache/CacheItem.php
Expand Up @@ -11,13 +11,14 @@

namespace Symfony\Component\Cache;

use Psr\Cache\CacheItemInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Cache\Exception\InvalidArgumentException;

/**
* @author Nicolas Grekas <p@tchwork.com>
*/
final class CacheItem implements TaggedCacheItemInterface
final class CacheItem implements CacheItemInterface
{
protected $key;
protected $value;
Expand Down Expand Up @@ -97,7 +98,13 @@ public function expiresAfter($time)
}

/**
* {@inheritdoc}
* Adds a tag to a cache item.
*
* @param string|string[] $tags A tag or array of tags
*
* @return static
*
* @throws InvalidArgumentException When $tag is not valid.
*/
public function tag($tags)
{
Expand Down
34 changes: 0 additions & 34 deletions src/Symfony/Component/Cache/TaggedCacheItemInterface.php

This file was deleted.

0 comments on commit 5cc9ed2

Please sign in to comment.