Я интегрирую Redis в свой Symfony2. Я использовал это Tuts:
http://olegpuzanov.com/2015/02/01/using ... -symfony2/
classnotfoundexception в appdevdebugproceprojectcontain. Класс "Redis" из глобального пространства имен.
Вы забыли оператор «использовать»?snc_redis:
# configure predis as client
clients:
default:
type: predis
alias: default
dsn: redis://localhost
doctrine:
type: predis
alias: doctrine
dsn: redis://localhost
# configure doctrine caching
doctrine:
metadata_cache:
client: doctrine
entity_manager: Content
document_manager: default
result_cache:
client: doctrine
entity_manager: [Content]
query_cache:
client: doctrine
entity_manager: Content
< /code>
и мой запрос: < /p>
$query = $this->createQueryBuilder('c')
->select('c.id, c.title, c.sequence, c.sequence_count, c.category_sequence, c.unique_id, c.priority, c.status, c.created_at,c.kaltura_id')
->addSelect('o.slug as owner')
->addSelect('cat.slug as category')
->addSelect("group_concat(m.name SEPARATOR ',') AS media")
->addSelect("group_concat(a.name SEPARATOR ',') AS album")
->innerJoin('c.content_owner', 'o')
->innerJoin('c.category', 'cat')
->leftJoin('c.media', 'm')
->leftJoin('c.albums', 'a')
->groupBy('c.id')
->setResultCacheDriver($predis)
# set cache lifetime
->setResultCacheLifetime($cache_lifetime)
->getQuery()
->getArrayResult();`
< /code>
Также я зарегистрировал пакет SNC в моем ядре приложения. < /p>
Пожалуйста, помогите < /p>
Подробнее здесь: https://stackoverflow.com/questions/319 ... -not-found