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

[12.x] Introduce Job@resolveQueuedJobClass() #54613

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

cosmastech
Copy link
Contributor

This will resolve: #54502

This adds a method to the Job interface which is used for determining the class-name for the wrapped job. Job@resolveName() was modified to return the displayName, which works for most cases. However, when we are checking if a Job should be silently deleted if a model no longer exists, we use reflection. Since the displayName may not be a class, this won't work.

Alternate solution

To avoid modifying the contract on the Job interface, we could simply add another check to CallQueuedHandler@handleModelNotFound() where it checks that the class exists before we reflect the $class name.

@taylorotwell taylorotwell merged commit dc63a5d into laravel:master Feb 14, 2025
39 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