Skip to content

Commit 4765361

Browse files
author
rhoogstad
committed
changed passing path using cacheOptions
1 parent a290b42 commit 4765361

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Dflydev/Pimple/Provider/DoctrineOrm/DoctrineOrmServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ public function register(\Pimple $app)
255255
return new XcacheCache;
256256
});
257257

258-
$app['orm.cache.factory.filesystem'] = $app->protect(function() use ($app) {
259-
if (empty($app['orm.cache.path'])) {
258+
$app['orm.cache.factory.filesystem'] = $app->protect(function($cacheOptions) {
259+
if (empty($cacheOptions['path'])) {
260260
throw new \RuntimeException('FilesystemCache path not defined');
261261
}
262-
return new FilesystemCache($app['orm.cache.path']);
262+
return new FilesystemCache($cacheOptions['path']);
263263
});
264264

265265
$app['orm.cache.factory'] = $app->protect(function($driver, $cacheOptions) use ($app) {
@@ -275,7 +275,7 @@ public function register(\Pimple $app)
275275
case 'memcached':
276276
return $app['orm.cache.factory.memcached']($cacheOptions);
277277
case 'filesystem':
278-
return $app['orm.cache.factory.filesystem']();
278+
return $app['orm.cache.factory.filesystem']($cacheOptions);
279279
default:
280280
throw new \RuntimeException("Unsupported cache type '$driver' specified");
281281
}

0 commit comments

Comments
 (0)