snc / SncRedisBundle

A Redis bundle for Symfony supporting Predis and PhpRedis
https://github.com/snc/SncRedisBundle
MIT License
1.04k stars 327 forks source link

ClassNotFoundException in SncRedisExtension.php line 162: #332

Closed reypm closed 7 years ago

reypm commented 7 years ago

I am working in a Symfony 3.2.4 project and I have installed SncRedisBundle. Following docs Use version 2.* for Symfony 2.7+ and 3.0+ I have used composer require snc/redis-bundle 2.* and I end with the following version installed:

snc/redis-bundle                     2.0.1   A Redis bundle for Symfony

I have configured in config.yml as follow:

# SncRedis Configuration
snc_redis:
  # configure predis as client
  clients:
      default:
          type: predis
          alias: default
          dsn: redis://redis

Note: redis is installed in a container named as redis that's why I'm using dsn: redis://redis (maybe another name will be less confusing).

But when I access any controller I got the following error:

ClassNotFoundException in SncRedisExtension.php line 162:
Attempted to load class "Factory" from namespace "Predis\Profile".
Did you forget a "use" statement for e.g. "Zend_Cloud_DocumentService_Factory", "Zend_Cloud_Infrastructure_Factory", "Zend_Cloud_QueueService_Factory", "Zend_Cloud_StorageService_Factory", "mmi\AdvancedSearch\Factory", "mmi\Documents\Factory", "mmi\Resource\Factory", "mmi\SimpleImporter\Factory", "mmi\CompanyTemplate\Table\Factory", "mmi\CRUD\Factory" or "mmi\DataSource\Factory"?

What I am missing here? Is this a bug?

csernikmarton commented 7 years ago

Hi @reypm, have you maybe figured out what was wrong here? I ran into a similar issue.

reypm commented 7 years ago

@csernikmarton sadly I am not, I had to uninstall the bundle because I couldn't work with it enable

csernikmarton commented 7 years ago

For future reference, the solution is to install Predis, too, e.g.: composer require predis/predis

reypm commented 7 years ago

@csernikmarton ok, perfect I am gonna close this issue since you found the solution.