[Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead#29236
Merged
nicolas-grekas merged 1 commit intosymfony:masterfrom Jan 26, 2019
Merged
[Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead#29236nicolas-grekas merged 1 commit intosymfony:masterfrom
nicolas-grekas merged 1 commit intosymfony:masterfrom
Conversation
b6e9ae1 to
e5c2abb
Compare
stof
reviewed
Nov 16, 2018
Tobion
previously requested changes
Nov 16, 2018
Tobion
reviewed
Nov 16, 2018
f65edc3 to
4a46b21
Compare
Psr16Cachecbcd439 to
3c06f7d
Compare
3c06f7d to
cb8327c
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Dec 19, 2018
…-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 to
0cf7b2a
Compare
Member
isn't this broken ? Our exceptions implement both the PSR-6 and PSR-16 interfaces, and so both are hard requirements. |
stof
reviewed
Dec 19, 2018
| public function createCachePool($defaultLifetime = 0) | ||
| { | ||
| return new SimpleCacheAdapter(new Psr6Cache(new FilesystemAdapter()), '', $defaultLifetime); | ||
| return new SimpleCacheAdapter(new FilesystemCache(), '', $defaultLifetime); |
Member
There was a problem hiding this comment.
isn't this reverting your recent change ?
Member
Author
There was a problem hiding this comment.
correct - and the updated test case is now in Psr16AdapterTest
0cf7b2a to
1c88b86
Compare
Member
Author
Good catch. Fixed by conditionally implementing the PSR-16 one only when it's available. |
1c88b86 to
8c3c20a
Compare
8c3c20a to
529db40
Compare
Member
Author
|
Now rebased, ready. |
sstok
reviewed
Jan 25, 2019
b79deb4 to
a322860
Compare
Member
|
Looks like we still need a rebase here :) |
a322860 to
63ea665
Compare
Member
Author
|
oups, rebased. |
63ea665 to
5006be6
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Jan 26, 2019
…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" instead Commits ------- 5006be6 [Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead
Contributor
|
Missing documentation change. This part is now outdated: https://symfony.com/doc/master/components/cache.html#available-simple-cache-psr-16-classes |
Merged
DavidPrevot
added a commit
to DavidPrevot/symfony
that referenced
this pull request
May 12, 2019
It has already been moved in cache via symfony#29236.
TomasVotruba
pushed a commit
to easy-coding-standard/easy-coding-standard
that referenced
this pull request
May 30, 2019
Fixes #1557 See symfony/symfony#29236
TomasVotruba
pushed a commit
to easy-coding-standard/easy-coding-standard
that referenced
this pull request
Aug 22, 2019
Fixes #1557 See symfony/symfony#29236
loevgaard
added a commit
to loevgaard/CodingStandard
that referenced
this pull request
May 6, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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