-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.5] [PSR-16] Implement SimpleCache #20194
Conversation
|
||
interface Repository | ||
interface Repository extends CacheInterface |
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.
I feel that this should be \Illuminate\Cache\Repository
that implements Psr\SimpleCache\CacheInterface
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.
I'm doing here the same thing I did in psr-11: https://github.com/laravel/framework/pull/19822/files#diff-51bfc610692c3ed3388dec0ec04bd3baR8 for consistency
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.
Yeah true, it' weird. I had a look at \Illuminate\Contracts\Container\Container
too, which extends \Psr\Container\ContainerInterface
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.
Nevertheless @deleugpn make sure to add this "psr/simple-cache": "~1.0"
in Illuminate/Contracts/composer.json
too 😉
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.
Done :)
src/Illuminate/Cache/Repository.php
Outdated
return $this->many($keys); | ||
} | ||
|
||
$default = collect($default); |
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.
Why not just using an array ?
What benefits will this provide in terms of interop right now. Which libraries are using PSR-16? |
Some 120 packages : https://packagist.org/packages/psr/simple-cache/dependents |
Sigh, another PSR that no one is going to care about 😄 |
I appreciate the efforts. In then environment I work in, these interoperability patches really come in handy. |
I guess I cannot really answer to the question about interop. My proposal came from reading the survey from the PSR (which Laravel was included) and noticed that it was just a few steps away from becoming fully compatible: https://docs.google.com/spreadsheet/ccc?key=0Ak2JdGialLildEM2UjlOdnA4ekg3R1Bfeng5eGlZc1E#gid=0 |
Examples? |
Make Laravel 5.5 compliant with PSR-16