-
Notifications
You must be signed in to change notification settings - Fork 76
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined array key "request" #180
Comments
Having the same issue. Its not the first time that this package introduces breaking changes on minor/patch versions. Problem is that you have cached an older serialized version of this class and now when you are deserializing, you can not instantiate the object anymore. This is a very bad approach. Either it should have been a documented breaking change with provided migration guide or make sure that the cache key is prefixed with a vendor's version so that such breaking cache structure changes will result in a cache miss without crashing the app. |
@e-zannelli it seems like your change causes this issue. Can you maybe add proper validation that checks if the request index exists? Or do you have a better proposal how to resolve this? |
As this already happened in the past, I have written a cache wrapper that adds a prefix to each key, this time I just had to change the prefix from @Kevinrob please try to avoid introducing breaking changes on minor/patch versions as it basically breaks the app for all of your package users. |
@danepowell Would you be able to confirm the fix in #181 fix your issue? Thanks |
ho! I'm very sorry, I don't catch the fact that this will be a breaking change! |
I'm not 100% confident in my ability to reproduce this error, but yes, in my limited testing the 4.1.2 release fixes this. Thanks! |
Thank you @danepowell for the follow up. I close this issue, don't hesitate to reopen it if necessary. |
Our project recently upgraded from guzzle-cache-middleware 4.0.2 to 4.1.1 and from guzzlehttp/promises 1.5.2 to 2.0.0 as part of the same release. Immediately we started getting reports from users of this error:
Undefined array key "request"
https://github.com/Kevinrob/guzzle-cache-middleware/blob/0e12dccf3c811a18bb2f6c93882c5b5727e1b859/src/CacheEntry.php#LL275C5-L275C5
I haven't personally been able to recreate this. I'm not sure what conditions are necessary to trigger it.
Since guzzlehttp/promises has breaking changes and this library was only just updated to support it, I have to suspect this is causal.
The text was updated successfully, but these errors were encountered: