Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated FileCacheReader for doctrine annotations #634

Merged
merged 1 commit into from
Sep 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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