-
-
Notifications
You must be signed in to change notification settings - Fork 453
Psr16Adapter should convert Traversable into array in deleteMultiple #700
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
Comments
Hello ! Thanks for that issue, I'll take a look this weekend. Cheers, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Geolim4 will you make sure this issue stays open? |
Yeah, I'm a little sick these day, I will treat all the pending issues on a row :) |
bylexus
added a commit
to bylexus/phpfastcache
that referenced
this issue
Sep 3, 2019
…rts $keys to an array. The internal Psr\Cache\CacheItemPoolInterface::deleteItems requires an array as argument. Some popular tools like PhpSpreadsheet use a Traversable instead. This is the fix for the v6 branch.
bylexus
added a commit
to bylexus/phpfastcache
that referenced
this issue
Sep 3, 2019
…Traversable $keys in an array The internal array_map function can only be used with native arrays.
bylexus
added a commit
to bylexus/phpfastcache
that referenced
this issue
Sep 3, 2019
…nverts Traversable $keys in an array The internal array_map function can only be used with native arrays.
Geolim4
added a commit
that referenced
this issue
Sep 4, 2019
fixes #700 for v6: Psr16Adapter::deleteMultiple converts $keys to an array
Geolim4
added a commit
that referenced
this issue
Sep 4, 2019
fixes #700: Psr16Adapter::deleteMultiple converts $keys to an array.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Configuration
Describe the bug
The PSR-6
CacheItemPoolInterface
requires an array as input todeleteItems
however PSR-16 accepts an array or aTraversable
as input todeleteMultiple
. But inPsr16Adapter
, the input is passed fromdeleteMultiple
directly todeleteItems
without checking if it is anarray
.Using
Psr16Adapter
and callingdeleteMultiple
with the output from a generator function should work since it follows PSR-16. But currently it triggers an error:To Reproduce
Steps to reproduce the behavior:
Use the
Psr16Adapter
and calldeleteMultiple
using a generator function. PhpSpreadsheets does this.Expected behavior
deleteMultiple
should convert anyTraversable
to anarray
before callingdeleteItems
.The text was updated successfully, but these errors were encountered: