Skip to content

Commit 29012f4

Browse files
Alias CacheManager so the class is injectable in Lumen as well, fixes #101
1 parent 8804fa9 commit 29012f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DoctrineServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ protected function setupMetaData()
147147
*/
148148
protected function setupCache()
149149
{
150+
// Alias the cache, so the class is injectable in Lumen too
151+
$this->app->alias('cache', \Illuminate\Cache\CacheManager::class);
152+
153+
// Bind Doctrine CacheManager
150154
$this->app->singleton(CacheManager::class);
151155
}
152156

0 commit comments

Comments
 (0)