Skip to content

Commit fe97c7c

Browse files
committed
We do not need cache/doctrine-adapter but we do need the psr interfaces. Also suggest the adapters
1 parent 7918f50 commit fe97c7c

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"require": {
2121
"php": "^5.5|^7",
2222
"symfony/framework-bundle": "^2.6|^3.0",
23-
"cache/doctrine-adapter": "^0.3"
23+
"symfony/options-resolver": "^2.6|^3.0",
24+
"psr/cache": "1.0.0"
2425
},
2526
"require-dev": {
2627
"phpunit/phpunit": "5.0.*|^4.0",
@@ -29,6 +30,11 @@
2930
"cache/redis-adapter": "@stable",
3031
"cache/memcached-adapter": "@stable"
3132
},
33+
"suggest": {
34+
"cache/doctrine-adapter": "To integrate with doctrine/cache",
35+
"cache/redis-adapter": "Redis adapter",
36+
"cache/memcached-adapter": "Memcached adapter"
37+
},
3238
"autoload": {
3339
"psr-4": {
3440
"Cache\\AdapterBundle\\": "src/"

src/Factory/DoctrineRedisFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function createAdapter(array $options = [])
3030
}
3131

3232
$config = $this->configureOptions($options);
33-
$redis = new \Redis();
33+
$redis = new \Redis();
3434
$redis->connect($config['host'], $config['port']);
3535

3636
$client = new RedisCache();
@@ -39,7 +39,6 @@ public function createAdapter(array $options = [])
3939
return new DoctrineCachePool($client);
4040
}
4141

42-
4342
/**
4443
* @param array $options
4544
*

src/Factory/RedisFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ private function configureOptions(array $options)
4444
{
4545
$resolver = new OptionsResolver();
4646
$resolver->setDefaults([
47-
'host' => '127.0.0.1',
48-
'port' => '6379',
47+
'host' => '127.0.0.1',
48+
'port' => '6379',
4949
'protocol' => 'tcp',
5050
]);
5151

0 commit comments

Comments
 (0)