Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead#29236
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
b6e9ae1 toe5c2abbCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
f65edc3 to4a46b21ComparePsr16Cachecbcd439 to3c06f7dCompare3c06f7d tocb8327cCompare…-grekas)This PR was merged into the 4.2 branch.Discussion----------[Cache] fix Simple\Psr6Cache proxying of metadata| Q | A| ------------- | ---| Branch? | 4.2| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Discovered while working on#29236.Commits-------02edc9b [Cache] fix Simple\Psr6Cache proxying of metadata
f88902a to0cf7b2aComparestof commentedDec 19, 2018
isn't this broken ? Our exceptions implement both the PSR-6 and PSR-16 interfaces, and so both are hard requirements. |
| publicfunctioncreateCachePool($defaultLifetime =0) | ||
| { | ||
| returnnewSimpleCacheAdapter(newPsr6Cache(newFilesystemAdapter()),'',$defaultLifetime); | ||
| returnnewSimpleCacheAdapter(newFilesystemCache(),'',$defaultLifetime); |
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.
isn't this reverting your recent change ?
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.
correct - and the updated test case is now in Psr16AdapterTest
0cf7b2a to1c88b86Comparenicolas-grekas commentedDec 19, 2018
Good catch. Fixed by conditionally implementing the PSR-16 one only when it's available. |
1c88b86 to8c3c20aCompare8c3c20a to529db40Comparenicolas-grekas commentedJan 24, 2019
Now rebased, ready. |
Uh oh!
There was an error while loading.Please reload this page.
b79deb4 toa322860Comparefabpot commentedJan 25, 2019
Looks like we still need a rebase here :) |
a322860 to63ea665Comparenicolas-grekas commentedJan 25, 2019
oups, rebased. |
63ea665 to5006be6Compare…che instead (nicolas-grekas)This PR was merged into the 4.3-dev branch.Discussion----------[Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -As discussed in#28918, PSR-16 implementations are now mostly useless: either PSR-6 or contracts' CacheInterface is always a better fit.Let's deprecate them all but keep only a `Psr16Cache` to turn any PSR-6 implementation to a PSR-16 one.From the changelog: * removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it * deprecated all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead * deprecated `SimpleCacheAdapter`, use `Psr16Adapter` instead * deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" insteadCommits-------5006be6 [Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead
enumag commentedApr 9, 2019
Missing documentation change. This part is now outdated:https://symfony.com/doc/master/components/cache.html#available-simple-cache-psr-16-classes |
It has already been moved in cache viasymfony#29236.
Uh oh!
There was an error while loading.Please reload this page.
As discussed in#28918, PSR-16 implementations are now mostly useless: either PSR-6 or contracts' CacheInterface is always a better fit.
Let's deprecate them all but keep only a
Psr16Cacheto turn any PSR-6 implementation to a PSR-16 one.From the changelog:
psr/simple-cachedependency, runcomposer require psr/simple-cacheif you need itPsr16CacheorSymfony\Contracts\Cache\CacheInterfaceimplementations insteadSimpleCacheAdapter, usePsr16Adapterinstead