Skip to content

Commit

Permalink
Easier memcache configuration
Browse files Browse the repository at this point in the history
* Minimum version of kdyby/doctrine-cache upped to 2.1
  • Loading branch information
fprochazka committed Oct 27, 2013
1 parent 0263d5d commit d11ce9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
"require": {
"nette/nette": "@dev",
"doctrine/orm": "~2.4",
"kdyby/events": "@dev",
"kdyby/console": "@dev",
"kdyby/annotations": "@dev"
"kdyby/events": "~2.0",
"kdyby/console": "~2.0",
"kdyby/annotations": "~2.0",
"kdyby/doctrine-cache": "~2.1"
},
"require-dev": {
"nette/tester": "@dev",
Expand Down
6 changes: 3 additions & 3 deletions src/Kdyby/Doctrine/DI/OrmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class OrmExtension extends Nette\DI\CompilerExtension
'default' => 'Kdyby\DoctrineCache\Cache',
'apc' => 'Doctrine\Common\Cache\ApcCache',
'array' => 'Doctrine\Common\Cache\ArrayCache',
'memcache' => 'Doctrine\Common\Cache\MemcacheCache',
'memcache' => 'Kdyby\DoctrineCache\MemcacheCache',
'redis' => 'Doctrine\Common\Cache\RedisCache',
'xcache' => 'Doctrine\Common\Cache\XcacheCache',
);
Expand Down Expand Up @@ -463,7 +463,7 @@ protected function processMetadataDriver(Nette\DI\ServiceDefinition $metadataDri
$serviceName = $this->prefix($prefix . '.driver.' . str_replace('\\', '_', $namespace) . '.' . $impl . 'Impl');

$this->getContainerBuilder()->addDefinition($serviceName)
->setClass($driver->entity)
->setClass('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver')
->setFactory($driver->entity, $driver->arguments)
->setAutowired(FALSE)
->setInject(FALSE);
Expand Down Expand Up @@ -496,7 +496,7 @@ protected function processCache($cache, $suffix)
}

$def = $builder->addDefinition($serviceName = $this->prefix('cache.' . $suffix))
->setClass($cache->entity)
->setClass('Doctrine\Common\Cache\Cache')
->setFactory($cache->entity, $cache->arguments)
->setAutowired(FALSE)
->setInject(FALSE);
Expand Down

0 comments on commit d11ce9e

Please sign in to comment.