File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed
Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 33[ ![ codecov.io] ( https://codecov.io/github/php-cache/adapter-bundle/coverage.svg?branch=master )] ( https://codecov.io/github/php-cache/adapter-bundle?branch=master ) [ ![ Build Status] ( https://travis-ci.org/php-cache/adapter-bundle.svg?branch=master )] ( https://travis-ci.org/php-cache/adapter-bundle )
44[ ![ Total Downloads] ( https://poser.pugx.org/cache/adapter-bundle/downloads )] ( https://packagist.org/packages/cache/adapter-bundle )
55[ ![ Monthly Downloads] ( https://poser.pugx.org/cache/adapter-bundle/d/monthly.png )] ( https://packagist.org/packages/cache/adapter-bundle )
6- [ ![ Quality Score] ( https://img.shields.io/scrutinizer/g/cache/adapter-bundle.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/cache/adapter-bundle )
7- [ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a/mini.png )] ( https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a )
6+ [ ![ Quality Score] ( https://img.shields.io/scrutinizer/g/php- cache/adapter-bundle.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/php- cache/adapter-bundle )
7+ [ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a/mini.png )] ( https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a )
88[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE )
99
1010
Original file line number Diff line number Diff line change 4040 "cache/predis-adapter" : " @stable" ,
4141 "cache/redis-adapter" : " @stable" ,
4242 "cache/void-adapter" : " @stable" ,
43+ "cache/prefixed-cache" : " @stable" ,
4344 "doctrine/cache" : " ^1.6" ,
4445 "predis/predis" : " ^1.1"
4546 },
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ private function findReferences(array $options)
7575 foreach ($ options as $ key => $ value ) {
7676 if (is_array ($ value )) {
7777 $ options [$ key ] = $ this ->findReferences ($ value );
78- } elseif (substr ($ key , -8 ) === '_service ' || strpos ($ value , '@ ' ) === 0 ) {
78+ } elseif (substr ($ key , -8 ) === '_service ' || strpos ($ value , '@ ' ) === 0 || $ key === ' service ' ) {
7979 $ options [$ key ] = new Reference (ltrim ($ value , '@ ' ));
8080 }
8181 }
Original file line number Diff line number Diff line change 2222use Cache \Adapter \Redis \RedisCachePool ;
2323use Cache \Adapter \Void \VoidCachePool ;
2424use Cache \AdapterBundle \CacheAdapterBundle ;
25+ use Cache \Namespaced \NamespacedCachePool ;
26+ use Cache \Prefixed \PrefixedCachePool ;
2527use Nyholm \BundleTest \BaseBundleTestCase ;
2628
2729class BundleInitializationTest extends BaseBundleTestCase
@@ -52,6 +54,9 @@ public function testFactoriesWithWithDefaultConfiguration()
5254
5355 $ this ->assertInstanceOf (DoctrineCachePool::class, $ container ->get ('cache.provider.doctrine_filesystem ' ));
5456 $ this ->assertInstanceOf (DoctrineCachePool::class, $ container ->get ('cache.provider.doctrine_predis ' ));
57+
58+ $ this ->assertInstanceOf (NamespacedCachePool::class, $ container ->get ('cache.provider.namespaced ' ));
59+ $ this ->assertInstanceOf (PrefixedCachePool::class, $ container ->get ('cache.provider.prefixed ' ));
5560 }
5661
5762 public function testMemcachedWithWithDefaultConfiguration ()
Original file line number Diff line number Diff line change @@ -38,3 +38,14 @@ cache_adapter:
3838 factory : ' cache.factory.doctrine_predis'
3939 doctrine_redis :
4040 factory : ' cache.factory.doctrine_redis'
41+
42+ namespaced :
43+ factory : ' cache.factory.namespaced'
44+ options :
45+ service : ' cache.provider.void'
46+ namespace : ' foobar'
47+ prefixed :
48+ factory : ' cache.factory.prefixed'
49+ options :
50+ service : ' cache.provider.void'
51+ prefix : ' foobar'
You can’t perform that action at this time.
0 commit comments