http://www.glic.co.jp/blog/archives/2627 を見ながら追加しました。
macでredisを入れ
composer require snc/redis-bundle
でredisのライブラリを追加しました。
app/vendor/snc/redis-bundle/SncRedisBundle.php
が存在することを確認しました。
カーネルにSncRedisBundleを追加しました。
app/AppKernel.php
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new AppBundle\AppBundle(), new Snc\RedisBundle\SncRedisBundle(), // 追加
エラーログは以下のとおりです。
FatalErrorException: Error: Class 'Snc\RedisBundle\SncRedisBundle' not found in /var/www/leaning-symfony2/app/AppKernel.php line 22 in /var/www/leaning-symfony2/app/AppKernel.php line 22 at ErrorHandler->handleFatal() in /var/www/leaning-symfony2/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php line 0 at AppKernel->registerBundles() in /var/www/leaning-symfony2/app/bootstrap.php.cache line 2487 at Kernel->initializeBundles() in /var/www/leaning-symfony2/app/bootstrap.php.cache line 2317 at Kernel->boot() in /var/www/leaning-symfony2/app/bootstrap.php.cache line 2349 at Kernel->handle() in /var/www/leaning-symfony2/web/app_dev.php line 35 at ??{main}() in /var/www/leaning-symfony2/web/app_dev.php line 0
あなたの回答
tips
プレビュー