Skip to content

Commit d9f19bc

Browse files
[Cache] leverage Contracts\Cache
1 parent f7cad20 commit d9f19bc

File tree

14 files changed

+32
-86
lines changed

14 files changed

+32
-86
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
<service id="Psr\Cache\CacheItemPoolInterface" alias="cache.app" />
150150
<service id="Psr\SimpleCache\CacheInterface" alias="cache.app.simple" />
151151
<service id="Symfony\Component\Cache\Adapter\AdapterInterface" alias="cache.app" />
152-
<service id="Symfony\Component\Cache\CacheInterface" alias="cache.app.taggable" />
152+
<service id="Symfony\Contracts\Cache\CacheInterface" alias="cache.app" />
153+
<service id="Symfony\Contracts\Cache\TagAwareCacheInterface" alias="cache.app.taggable" />
153154
</services>
154155
</container>

src/Symfony/Component/Cache/Adapter/AbstractAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
use Psr\Log\LoggerAwareInterface;
1616
use Psr\Log\LoggerInterface;
1717
use Psr\Log\NullLogger;
18-
use Symfony\Component\Cache\CacheInterface;
1918
use Symfony\Component\Cache\CacheItem;
2019
use Symfony\Component\Cache\Exception\InvalidArgumentException;
2120
use Symfony\Component\Cache\ResettableInterface;
2221
use Symfony\Component\Cache\Traits\AbstractTrait;
2322
use Symfony\Component\Cache\Traits\GetTrait;
23+
use Symfony\Contracts\Cache\CacheInterface;
2424

2525
/**
2626
* @author Nicolas Grekas <p@tchwork.com>

src/Symfony/Component/Cache/Adapter/ArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
use Psr\Cache\CacheItemInterface;
1515
use Psr\Log\LoggerAwareInterface;
16-
use Symfony\Component\Cache\CacheInterface;
1716
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\ResettableInterface;
1918
use Symfony\Component\Cache\Traits\ArrayTrait;
19+
use Symfony\Contracts\Cache\CacheInterface;
2020

2121
/**
2222
* @author Nicolas Grekas <p@tchwork.com>

src/Symfony/Component/Cache/Adapter/ChainAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
use Psr\Cache\CacheItemInterface;
1515
use Psr\Cache\CacheItemPoolInterface;
16-
use Symfony\Component\Cache\CacheInterface;
1716
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\Exception\InvalidArgumentException;
1918
use Symfony\Component\Cache\PruneableInterface;
2019
use Symfony\Component\Cache\ResettableInterface;
2120
use Symfony\Component\Cache\Traits\GetTrait;
21+
use Symfony\Contracts\Cache\CacheInterface;
2222
use Symfony\Contracts\Service\ResetInterface;
2323

2424
/**

src/Symfony/Component/Cache/Adapter/NullAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Component\Cache\Adapter;
1313

1414
use Psr\Cache\CacheItemInterface;
15-
use Symfony\Component\Cache\CacheInterface;
1615
use Symfony\Component\Cache\CacheItem;
16+
use Symfony\Contracts\Cache\CacheInterface;
1717

1818
/**
1919
* @author Titouan Galopin <galopintitouan@gmail.com>

src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
use Psr\Cache\CacheItemInterface;
1515
use Psr\Cache\CacheItemPoolInterface;
16-
use Symfony\Component\Cache\CacheInterface;
1716
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\Exception\InvalidArgumentException;
1918
use Symfony\Component\Cache\PruneableInterface;
2019
use Symfony\Component\Cache\ResettableInterface;
2120
use Symfony\Component\Cache\Traits\GetTrait;
2221
use Symfony\Component\Cache\Traits\PhpArrayTrait;
22+
use Symfony\Contracts\Cache\CacheInterface;
2323

2424
/**
2525
* Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0.

src/Symfony/Component/Cache/Adapter/ProxyAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
use Psr\Cache\CacheItemInterface;
1515
use Psr\Cache\CacheItemPoolInterface;
16-
use Symfony\Component\Cache\CacheInterface;
1716
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\PruneableInterface;
1918
use Symfony\Component\Cache\ResettableInterface;
2019
use Symfony\Component\Cache\Traits\GetTrait;
2120
use Symfony\Component\Cache\Traits\ProxyTrait;
21+
use Symfony\Contracts\Cache\CacheInterface;
2222

2323
/**
2424
* @author Nicolas Grekas <p@tchwork.com>

src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313

1414
use Psr\Cache\CacheItemInterface;
1515
use Psr\Cache\InvalidArgumentException;
16-
use Symfony\Component\Cache\CacheInterface;
1716
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\PruneableInterface;
1918
use Symfony\Component\Cache\ResettableInterface;
2019
use Symfony\Component\Cache\Traits\GetTrait;
2120
use Symfony\Component\Cache\Traits\ProxyTrait;
21+
use Symfony\Contracts\Cache\TagAwareCacheInterface;
2222

2323
/**
2424
* @author Nicolas Grekas <p@tchwork.com>
2525
*/
26-
class TagAwareAdapter implements CacheInterface, TagAwareAdapterInterface, PruneableInterface, ResettableInterface
26+
class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface
2727
{
2828
const TAGS_PREFIX = "\0tags\0";
2929

src/Symfony/Component/Cache/Adapter/TraceableAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Component\Cache\Adapter;
1313

1414
use Psr\Cache\CacheItemInterface;
15-
use Symfony\Component\Cache\CacheInterface;
1615
use Symfony\Component\Cache\CacheItem;
1716
use Symfony\Component\Cache\PruneableInterface;
1817
use Symfony\Component\Cache\ResettableInterface;
18+
use Symfony\Contracts\Cache\CacheInterface;
1919
use Symfony\Contracts\Service\ResetInterface;
2020

2121
/**

src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
namespace Symfony\Component\Cache\Adapter;
1313

14-
use Symfony\Component\Cache\CacheInterface;
14+
use Symfony\Contracts\Cache\TagAwareCacheInterface;
1515

1616
/**
1717
* @author Robin Chalas <robin.chalas@gmail.com>
1818
*/
19-
class TraceableTagAwareAdapter extends TraceableAdapter implements CacheInterface, TagAwareAdapterInterface
19+
class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface
2020
{
2121
public function __construct(TagAwareAdapterInterface $pool)
2222
{

0 commit comments

Comments
 (0)