Skip to content

Commit 1277219

Browse files
committed
bug symfony#25409 [Bridge/Doctrine] Drop "memcache" type (nicolas-grekas)
This PR was merged into the 4.0 branch. Discussion ---------- [Bridge/Doctrine] Drop "memcache" type | Q | A | ------------- | --- | Branch? | 4.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#14629 | License | MIT | Doc PR | - There is no "memcache" extension for PHP 7. Only memcached works now. Commits ------- ce1c28f [Bridge/Doctrine] Drop "memcache" type
2 parents 3898e8f + ce1c28f commit 1277219

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,6 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD
318318
$container->setAlias($cacheDriverServiceId, new Alias($cacheDriver['id'], false));
319319

320320
return $cacheDriverServiceId;
321-
case 'memcache':
322-
$memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%';
323-
$memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%';
324-
$memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%';
325-
$memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && 0 === $cacheDriver['port']) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%';
326-
$cacheDef = new Definition($memcacheClass);
327-
$memcacheInstance = new Definition($memcacheInstanceClass);
328-
$memcacheInstance->setPrivate(true);
329-
$memcacheInstance->addMethodCall('connect', array(
330-
$memcacheHost, $memcachePort,
331-
));
332-
$container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcache_instance', $objectManagerName)), $memcacheInstance);
333-
$cacheDef->addMethodCall('setMemcache', array(new Reference($this->getObjectManagerElementName(sprintf('%s_memcache_instance', $objectManagerName)))));
334-
break;
335321
case 'memcached':
336322
$memcachedClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcached.class').'%';
337323
$memcachedInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcached_instance.class').'%';

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ public function providerBasicDrivers()
181181
array('doctrine.orm.cache.wincache.class', array('type' => 'wincache')),
182182
array('doctrine.orm.cache.zenddata.class', array('type' => 'zenddata')),
183183
array('doctrine.orm.cache.redis.class', array('type' => 'redis'), array('setRedis')),
184-
array('doctrine.orm.cache.memcache.class', array('type' => 'memcache'), array('setMemcache')),
185184
array('doctrine.orm.cache.memcached.class', array('type' => 'memcached'), array('setMemcached')),
186185
);
187186
}

0 commit comments

Comments
 (0)