Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
nicolas-grekas merged 1 commit intosymfony:masterfromnicolas-grekas:psr16-deprec
Jan 26, 2019

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedNov 15, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets-
LicenseMIT
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 aPsr16Cache to turn any PSR-6 implementation to a PSR-16 one.

From the changelog:

  • removedpsr/simple-cache dependency, runcomposer require psr/simple-cache if you need it
  • deprecated all PSR-16 adapters, usePsr16Cache orSymfony\Contracts\Cache\CacheInterface implementations instead
  • deprecatedSimpleCacheAdapter, usePsr16Adapter instead
  • deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead

Tobion
Tobion previously requested changesNov 16, 2018
@nicolas-grekasnicolas-grekasforce-pushed thepsr16-deprec branch 3 times, most recently fromf65edc3 to4a46b21CompareNovember 16, 2018 21:48
@nicolas-grekasnicolas-grekas changed the title[Cache] deprecate all PSR-16 adapters, providePsr16Cache[Cache] deprecate all PSR-16 adapters, provide Psr16Cache insteadDec 18, 2018
@nicolas-grekasnicolas-grekasforce-pushed thepsr16-deprec branch 3 times, most recently fromcbcd439 to3c06f7dCompareDecember 19, 2018 08:44
nicolas-grekas added a commit that referenced this pull requestDec 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
@nicolas-grekasnicolas-grekasforce-pushed thepsr16-deprec branch 3 times, most recently fromf88902a to0cf7b2aCompareDecember 19, 2018 09:31
@stof
Copy link
Member

* removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it

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);
Copy link
Member

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 ?

Copy link
MemberAuthor

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

@nicolas-grekas
Copy link
MemberAuthor

Our exceptions implement both the PSR-6 and PSR-16 interfaces, and so both are hard requirements.

Good catch. Fixed by conditionally implementing the PSR-16 one only when it's available.

@nicolas-grekas
Copy link
MemberAuthor

Now rebased, ready.

@nicolas-grekasnicolas-grekasforce-pushed thepsr16-deprec branch 2 times, most recently fromb79deb4 toa322860CompareJanuary 25, 2019 14:01
@fabpot
Copy link
Member

Looks like we still need a rebase here :)

@nicolas-grekas
Copy link
MemberAuthor

oups, rebased.

@nicolas-grekasnicolas-grekas merged commit5006be6 intosymfony:masterJan 26, 2019
nicolas-grekas added a commit that referenced this pull requestJan 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" insteadCommits-------5006be6 [Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead
@nicolas-grekasnicolas-grekas deleted the psr16-deprec branchJanuary 26, 2019 20:52
@enumag
Copy link
Contributor

Missing documentation change. This part is now outdated:https://symfony.com/doc/master/components/cache.html#available-simple-cache-psr-16-classes

@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
DavidPrevot added a commit to DavidPrevot/symfony that referenced this pull requestMay 12, 2019
It has already been moved in cache viasymfony#29236.
TomasVotruba pushed a commit to easy-coding-standard/easy-coding-standard that referenced this pull requestMay 30, 2019
TomasVotruba pushed a commit to easy-coding-standard/easy-coding-standard that referenced this pull requestAug 22, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

+2 more reviewers

@TobionTobionTobion left review comments

@sstoksstoksstok left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

7 participants

@nicolas-grekas@stof@fabpot@enumag@Tobion@sstok@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp