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] Apply NullAdapter as Null Object#40780
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
derrabus commentedApr 12, 2021
While I do prefer the proposed behavior, I'm unsure if we should simply change it in a bugfix release. Chances are that there are applications out there that rely on the current behavior. The current behavior is not completely unreasonable either: The cache never persists the passed value, which is what |
nicolas-grekas commentedApr 12, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
On my side, I think this is a really bug fix. The cache basically says: " |
roukmoute commentedApr 12, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
If I followPSR-6, |
ro0NL commentedApr 12, 2021
yet here we are :)
works for me 👍 |
stof commentedApr 12, 2021
the change here is precisely about enabling that, by making sure that NullAdapter does not report an error for its expected behavior. |
derrabus commentedApr 12, 2021
Then again, that does not render the current behavior inherently wrong. And we're talking about changing the existing behavior in a bug fix. |
stof commentedApr 12, 2021
@derrabus the current code reports NullAdapter as always having errors when trying to save, which then forces you to do a special case for NullAdapter in any code wanting to report failures loudly, because not persisting the value in NullAdapter is not a failure. It is the expected behavior of the adapter to always miss the cache. See the PR description for such a code. |
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.
All right. 🙂
derrabus commentedApr 12, 2021
Thank you@roukmoute. |
Uh oh!
There was an error while loading.Please reload this page.
There is a problem with the NullAdapter if I have to add an expression to work:
So the goal here is to modify the methods that are causing a problem to behave as a Null Object.