-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Review Required] Drop cache adapter support with Laravel 5.8+ #73
Changes from 5 commits
0fd38a5
d5849f6
055a0f4
c859098
9643090
84bd211
83bc8d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ phpunit.xml | |
vendor | ||
bin/ | ||
.php_cs.cache | ||
.phpunit.* |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,9 +99,11 @@ private function getConfigPath($path = '') | |
private function getSimpleCache() | ||
{ | ||
if ($cache = $this->app->config->get('swap.cache')) { | ||
$store = $this->app['cache']->store($cache)->getStore(); | ||
$store = $this->app['cache']->store($cache); | ||
|
||
return new SimpleCacheBridge(new IlluminateCachePool($store)); | ||
return $store instanceof \Psr\SimpleCache\CacheInterface | ||
? $store | ||
: new SimpleCacheBridge(new IlluminateCachePool($store->getStore())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you throw an exception if the class does not exist with a message suggesting to install the php-cache package ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added changes in order to throw an exception if PSR-6 adapter or PSR-16 bridge is missing. |
||
} | ||
|
||
return null; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the same to
/doc/readme.md
?