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] Throw exception if incompatible version of psr/simple-cache is used#45096

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

@colinodell
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#44738
LicenseMIT
Doc PRn/a

Addresses#44738 by throwing an explanatory exception when an incompatible version of psr/simple-log is used.

Important: This change should not be included in 6.0+, as those newer versions do not have this compatibility issue! This commit should instead be reverted during that merge.

Copy link
Member

@derrabusderrabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I wonder if we should check the return type of a method of theCacheInterface instead.

@colinodellcolinodellforce-pushed theprevent-installation-of-incompatible-package branch fromf725fe7 to9a72912CompareJanuary 20, 2022 23:42

namespaceSymfony\Component\Cache;

useComposer\InstalledVersions;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Let's use 3.0+ as version number and drop using this class

derrabus and colinodell reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sounds good! Fixed and force-pushed :)

@colinodellcolinodell changed the titleThrow exception if incompatible version of psr/simple-cache is used[Cache] Throw exception if incompatible version of psr/simple-cache is usedJan 21, 2022
@colinodellcolinodellforce-pushed theprevent-installation-of-incompatible-package branch from9a72912 toe35ad89CompareJanuary 21, 2022 13:49
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.
Can you please confirm that this effectively improves the situation by giving the patch a try on the case you had?

@carsonbotcarsonbot changed the title[Cache] Throw exception if incompatible version of psr/simple-cache is usedThrow exception if incompatible version of psr/simple-cache is usedJan 21, 2022
@carsonbotcarsonbot changed the titleThrow exception if incompatible version of psr/simple-cache is used[Cache] Throw exception if incompatible version of psr/simple-cache is usedJan 21, 2022
@colinodell
Copy link
ContributorAuthor

Can you please confirm that this effectively improves the situation by giving the patch a try on the case you had?

Performing a quick test directly within the component's source directory shows that the exception is indeed only thrown when psr/simple-cache 3.0 is installed:

image

This does not prevent the installation of the conflicting version as I originally hoped (and thus the oddly-named feature branch here), but it at least provides a clear explanation of what's wrong and how to correct it, which is good enough for me and my library's users :)

nicolas-grekas reacted with thumbs up emoji

@fabpot
Copy link
Member

Thank you@colinodell.

@fabpotfabpot merged commit8a0ed01 intosymfony:4.4Jan 22, 2022
@fabpot
Copy link
Member

Code reverted on 6.0+

colinodell reacted with thumbs up emoji

@colinodellcolinodell deleted the prevent-installation-of-incompatible-package branchJanuary 25, 2022 14:07
This was referencedJan 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@derrabusderrabusderrabus approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@colinodell@fabpot@nicolas-grekas@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp