Skip to content

Conversation

@faisuc
Copy link
Contributor

@faisuc faisuc commented Dec 2, 2025

Fixes issue #57853 where using Cache::spy() with Cache::memo()->remember() would fail with "Call to a member function remember() on null".

When you call Cache::spy() and then try to use Cache::memo()->remember(), the spy wasn't forwarding calls to the real CacheManager, so memo() was returning null. This meant you couldn't test code that uses memoized cache with spies.

@faisuc faisuc marked this pull request as draft December 2, 2025 07:41
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@faisuc faisuc marked this pull request as ready for review December 2, 2025 07:42
@taylorotwell taylorotwell merged commit 2f1b481 into laravel:12.x Dec 4, 2025
73 of 74 checks passed
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.

2 participants