Skip to content

Commit

Permalink
Merge pull request #24 from bitExpert-forks/fix-annotation-reader-dep…
Browse files Browse the repository at this point in the history
…endency

Fix annotation reader dependency
  • Loading branch information
Bukashk0zzz authored Sep 23, 2021
2 parents 43a0226 + 0ba942e commit 1857890
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions EventListener/JmsSerializeListenerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
use Bukashk0zzz\LiipImagineSerializationBundle\Annotation\LiipImagineSerializableField;
use Bukashk0zzz\LiipImagineSerializationBundle\Event\UrlNormalizerEvent;
use Bukashk0zzz\LiipImagineSerializationBundle\Normalizer\UrlNormalizerInterface;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Persistence\Proxy;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Persistence\Proxy;
use JMS\Serializer\EventDispatcher\ObjectEvent;
use Liip\ImagineBundle\Imagine\Cache\CacheManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
Expand All @@ -32,7 +32,7 @@ class JmsSerializeListenerAbstract
protected $requestContext;

/**
* @var CachedReader Cached annotation reader
* @var Reader Annotation reader
*/
protected $annotationReader;

Expand Down Expand Up @@ -63,7 +63,7 @@ class JmsSerializeListenerAbstract
*/
public function __construct(
RequestContext $requestContext,
CachedReader $annotationReader,
Reader $annotationReader,
CacheManager $cacheManager,
StorageInterface $vichStorage,
EventDispatcherInterface $eventDispatcher,
Expand Down
6 changes: 2 additions & 4 deletions Tests/EventListener/JmsSerializeEventsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
use Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures\User;
use Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures\UserPictures;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Cache\ArrayCache;
use JMS\Serializer\DeserializationContext;
use JMS\Serializer\EventDispatcher\EventDispatcher;
use JMS\Serializer\EventDispatcher\Events as JmsEvents;
Expand All @@ -38,7 +36,7 @@ class JmsSerializeEventsManager
private $dispatcher;

/**
* @var CachedReader Cached annotation reader
* @var AnnotationReader Annotation reader
*/
private $annotationReader;

Expand All @@ -52,7 +50,7 @@ class JmsSerializeEventsManager
*/
public function __construct()
{
$this->annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache());
$this->annotationReader = new AnnotationReader();
$this->symfonyEventDispatcher = new SymfonyEventDispatcher();
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/UserPictures.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures;

use Bukashk0zzz\LiipImagineSerializationBundle\Annotation as Bukashk0zzz;
use Doctrine\Common\Persistence\Proxy;
use Doctrine\Persistence\Proxy;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\HttpFoundation\File\File;
Expand Down

0 comments on commit 1857890

Please sign in to comment.