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

Using database cache with locks - Call to undefined function Illuminate\Cache\now() #1107

Closed
Justas-S opened this issue Sep 6, 2020 · 3 comments

Comments

@Justas-S
Copy link

Justas-S commented Sep 6, 2020

  • Lumen Version: v7.2.1
  • Laravel Version: v7.27.0
  • PHP Version: 7.4.9(cli)
  • Database Driver & Version: SQLite

Description:

The DatabaseLock references the now() helper which is defined in Laraavel foundation. Lumen does not have access to this component.

Steps To Reproduce:

  1. Set your cache provider to database
  2. Try to acquire a lock. For example by calling Cache::lock('example')->get(function () {});
@GrahamCampbell
Copy link
Member

I think we should just replace all occurrences of now with the body of that method.

@driesvints
Copy link
Member

laravel/framework#34262

@driesvints
Copy link
Member

Fixed in framework. Will be tagged soon.

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

No branches or pull requests

3 participants