Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
# Upgrade to 1.11
2
 
3
doctrine/cache will no longer be maintained and all cache implementations have
4
been marked as deprecated. These implementations will be removed in 2.0, which
5
will only contain interfaces to provide a lightweight package for backward
6
compatibility.
7
 
8
There are two new classes to use in the `Doctrine\Common\Cache\Psr6` namespace:
9
* The `CacheAdapter` class allows using any Doctrine Cache as PSR-6 cache. This
10
  is useful to provide a forward compatibility layer in libraries that accept
11
  Doctrine cache implementations and switch to PSR-6.
12
* The `DoctrineProvider` class allows using any PSR-6 cache as Doctrine cache.
13
  This implementation is designed for libraries that leak the cache and want to
14
  switch to allowing PSR-6 implementations. This class is design to be used
15
  during the transition phase of sunsetting doctrine/cache support.
16
 
17
A full example to setup a filesystem based PSR-6 cache with symfony/cache
18
using the `DoctrineProvider` to convert back to Doctrine's `Cache` interface:
19
 
20
```php
21
use Doctrine\Common\Cache\Psr6\DoctrineProvider;
22
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
23
 
24
$cachePool = new FilesystemAdapter();
25
$cache = DoctrineProvider::wrap($cachePool);
26
// $cache instanceof \Doctrine\Common\Cache\Cache
27
```