Skip to content

Commit

Permalink
Merge pull request #634 from schmittjoh/deprecated-reader
Browse files Browse the repository at this point in the history
Remove deprecated FileCacheReader for doctrine annotations
  • Loading branch information
goetas authored Sep 9, 2016
2 parents 5bfdc3f + eef2428 commit b359a1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/JMS/Serializer/SerializerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

namespace JMS\Serializer;

use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Cache\FilesystemCache;
use JMS\Serializer\Builder\DefaultDriverFactory;
use JMS\Serializer\Builder\DriverFactoryInterface;
use JMS\Serializer\Handler\PhpCollectionHandler;
Expand All @@ -42,7 +44,6 @@
use JMS\Serializer\Naming\PropertyNamingStrategyInterface;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\FileCacheReader;
use Metadata\Cache\FileCache;
use JMS\Serializer\Naming\SerializedNameAnnotationStrategy;
use JMS\Serializer\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -341,7 +342,8 @@ public function build()

if (null !== $this->cacheDir) {
$this->createDir($this->cacheDir.'/annotations');
$annotationReader = new FileCacheReader($annotationReader, $this->cacheDir.'/annotations', $this->debug);
$annotationsCache = new FilesystemCache($this->cacheDir.'/annotations');
$annotationReader = new CachedReader($annotationReader, $annotationsCache, $this->debug);
}
}

Expand Down

0 comments on commit b359a1b

Please sign in to comment.