Skip to content
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

[5.5] Fixed cache repository getMultiple implementation #29046

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

GrahamCampbell
Copy link
Member

The $default param of Psr\SimpleCache\CacheInterface::getMultiple is meant to be the default value, and not an array of defaults, or something of a similar form


For example, Symfony call getMultiple using new stdClass as the defaultm which crashes, because Laravel is trying to iterate over the parameter, instead of using it as the default.

Error Cannot use object of type stdClass as array 
    .../vendor/laravel/framework/src/Illuminate/Cache/Repository.php:131 Illuminate\Cache\Repository::getMultiple
    .../vendor/symfony/cache/Adapter/SimpleCacheAdapter.php:45 Symfony\Component\Cache\Adapter\SimpleCacheAdapter::doFetch
    .../vendor/symfony/cache/Adapter/AbstractAdapter.php:164 Symfony\Component\Cache\Adapter\AbstractAdapter::getItem
    .../vendor/php-http/cache-plugin/src/CachePlugin.php:143 Http\Client\Common\Plugin\CachePlugin::doHandleRequest

@driesvints
Copy link
Member

@GrahamCampbell can you rebase with 5.5? Tests will pass then.

@GrahamCampbell
Copy link
Member Author

Yeh, sure. :)

@GrahamCampbell GrahamCampbell force-pushed the 5.5-cache-get-multiple-fix branch from 0b4c144 to 338deed Compare July 4, 2019 12:51
@taylorotwell taylorotwell merged commit 8ce1108 into 5.5 Jul 5, 2019
@GrahamCampbell GrahamCampbell deleted the 5.5-cache-get-multiple-fix branch July 5, 2019 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants