Use the new Search annotation

Use "FOS\ElasticaBundle\Annotation\Search" instead of "FOS\ElasticaBundle\Configuration\Search" in the repository manager.
Update the cookbook
This commit is contained in:
Floran Brutel 2014-08-18 13:30:45 +02:00
parent af5fb7e97e
commit 69c2214bc5
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ class RepositoryManager implements RepositoryManagerInterface
}
$refClass = new \ReflectionClass($entityName);
$annotation = $this->reader->getClassAnnotation($refClass, 'FOS\\ElasticaBundle\\Configuration\\Search');
$annotation = $this->reader->getClassAnnotation($refClass, 'FOS\\ElasticaBundle\\Annotation\\Search');
if ($annotation) {
$this->entities[$entityName]['repositoryName']
= $annotation->repositoryClass;

View file

@ -58,7 +58,7 @@ Alternatively you can specify the custom repository using an annotation in the e
namespace Application\UserBundle\Entity;
use FOS\ElasticaBundle\Configuration\Search;
use FOS\ElasticaBundle\Annotation\Search;
/**
* @Search(repositoryClass="Acme\ElasticaBundle\SearchRepository\UserRepository")