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] 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
[Cache] Throw exception if incompatible version of psr/simple-cache is used#45096
Uh oh!
There was an error while loading.Please reload this page.
Conversation
2d39028 tof725fe7Compare
derrabus left a comment
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 wonder if we should check the return type of a method of theCacheInterface instead.
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.
f725fe7 to9a72912Compare| namespaceSymfony\Component\Cache; | ||
| useComposer\InstalledVersions; |
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.
Let's use 3.0+ as version number and drop using this class
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.
Sounds good! Fixed and force-pushed :)
9a72912 toe35ad89Compare
nicolas-grekas left a comment
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.
LGTM.
Can you please confirm that this effectively improves the situation by giving the patch a try on the case you had?
colinodell commentedJan 21, 2022
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: 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 :) |
fabpot commentedJan 22, 2022
Thank you@colinodell. |
fabpot commentedJan 22, 2022
Code reverted on 6.0+ |

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.