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] Name of job set by displayName() must be honoured by Schedule #50961

Closed
wants to merge 1 commit into from
Closed

Conversation

SCIF
Copy link
Contributor

@SCIF SCIF commented Apr 8, 2024

Queue jobs could have displayName() method providing a better naming than just a plain classname. This name is currently honoured by a queue worker but a queue scheduler. This PR fixes this inconsistency

@SCIF
Copy link
Contributor Author

SCIF commented Apr 8, 2024

More tests coming

UPD: added

*/
public function job($job, $queue = null, $connection = null)
public function job(object|string $job, ?string $queue = null, ?string $connection = null): CallbackEvent
Copy link
Contributor Author

@SCIF SCIF Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it will be better to make the signature properly typed as it can be done with php8.2. On one hand this is a BC for those extending this class. On another hand this is internal class and should not be extended.

Let me know what do you think. In case you consider this is as a major BC break, I would revert back signature as don't want to wait v12 to get this fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this as we currently do not fully type method signatures in the framework.

@SCIF SCIF changed the title Name of job set by displayName() must be honoured by Schedule [11.x] Name of job set by displayName() must be honoured by Schedule Apr 8, 2024
@taylorotwell
Copy link
Member

Resubmit without changing types.

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