-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Open
Description
Laravel Version
12.39.0
PHP Version
8.4.15
Database Driver & Version
No response
Description
I am adding some memoization to some cache calls:
// from
Cache::remember(...)
// to
Cache::memo()->remember(...)But tests using a cache spy start failing after this addition with the folllowing error:
$cache = Cache::spy();
// ...
$cache->shouldHaveReceived('remember');
// Call to a member function remember() on nullRewriting the test to the following also results in an error:
$cache = Cache::memo()->spy();
// method spy() is not available on MemoizedCacheStoreSteps To Reproduce
I've created a showcase repository here: https://github.com/Propaganistas/laravel-issue-57853
It contains two commits:
- Fresh Laravel application
- Minimal code to reproduce the issue
Run php artisan test or composer test to see the error.
Metadata
Metadata
Assignees
Labels
No labels