Skip to content

[12.x] Adds EagerLoad attribute and initializeOnQueue hook #55590

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

Draft
wants to merge 19 commits into
base: 12.x
Choose a base branch
from

Conversation

timacdonald
Copy link
Member

No description provided.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@timacdonald timacdonald changed the title [12.x] Add WithRelations attribute [12.x] Add WithRelations attribute Apr 29, 2025
@AndrewMast
Copy link
Contributor

I'm sure you're already on it, but the class name is still WithoutRelations.

@timacdonald timacdonald changed the title [12.x] Add WithRelations attribute [12.x] Add LoadRelations attribute Apr 29, 2025
@timacdonald timacdonald changed the title [12.x] Add LoadRelations attribute [12.x] LoadRelations and initilizer hooks on on the queue Apr 30, 2025
@timacdonald timacdonald changed the title [12.x] LoadRelations and initilizer hooks on on the queue [12.x] Adds EagerLoad attribute and initializeOnQueue hook Apr 30, 2025
}
}

if (in_array(Queueable::class, class_uses_recursive($this)) && method_exists($this, 'initializeOnQueue')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like swapping the order would be more optimal, but probably not by much:

if (method_exists($this, 'initializeOnQueue') && in_array(Queueable::class, class_uses_recursive($this))) {

Probably would only be important if this was called a lot.

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