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

[11.x] Fix unique jobs that have a uniqueVia method #54294

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

DougSisk
Copy link
Contributor

@DougSisk DougSisk commented Jan 21, 2025

This pertains to issue #54293.

Adds a test for a unique job that has a uniqueVia method and makes Illuminate\Cache\Repository::getName() public.

@DougSisk DougSisk changed the title [11.x] Adds test for uniqueVia job dispatch [11.x] Fix unique jobs that have a uniqueVia method Jan 22, 2025
@taylorotwell taylorotwell merged commit 71203fc into laravel:11.x Jan 22, 2025
38 checks passed
@gazben
Copy link
Contributor

gazben commented Jan 29, 2025

@DougSisk According to the docs, when you provide a driver witht the uniqueVia() function it looks like this:

docs: https://laravel.com/docs/11.x/queues#unique-job-locks

    public function uniqueVia(): Repository
    {
        return Cache::driver('redis');
    }

I'm doing the same thing in my code and I'm getting Call to undefined method Illuminate\Cache\RedisStore::getName() errors since the framework update. I don't see how the \Illuminate\Cache\RedisStore class gets the \Illuminate\Cache\Repository::getName() function. It just extends the TaggableStore and that implements the Store interface.

Is the docs accurate in this case?

EDIT: sorry, I take it back. With the new version it seems to work.

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