Skip to content

Commit 0a1220f

Browse files
[Cache] leverage Contracts\Cache
1 parent 0978604 commit 0a1220f

File tree

18 files changed

+43
-89
lines changed

18 files changed

+43
-89
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@
114114
"psr/cache-implementation": "1.0",
115115
"psr/container-implementation": "1.0",
116116
"psr/log-implementation": "1.0",
117-
"psr/simple-cache-implementation": "1.0"
117+
"psr/simple-cache-implementation": "1.0",
118+
"symfony/cache-contracts": "1.0",
119+
"symfony/service-contracts": "1.0",
120+
"symfony/translation-contracts": "1.0"
118121
},
119122
"autoload": {
120123
"psr-4": {

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
/**

0 commit comments

Comments
 (0)