Skip to content

Reset duplicateQueries on EloquentDataSource - #746

Merged
itsgoingd merged 1 commit into
itsgoingd:masterfrom
yahya09:master
Sep 14, 2025
Merged

Reset duplicateQueries on EloquentDataSource#746
itsgoingd merged 1 commit into
itsgoingd:masterfrom
yahya09:master

Conversation

@yahya09

@yahya09 yahya09 commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

When using Laravel Octane, the package does reset all registered data sources every time new request received by listening to Octane RequestReceived event. However, one field is missed to be reset in EloquentDataSource with detect duplicate query enabled: $duplicateQueries located in EloquentDetectDuplicateQueries trait.

The workaround for this issue is by manually reset the field by using reflection on the clockwork.eloquent singleton, inside listener to the same Octane event. I hope this PR can be merged soon so I can dispose the workaround code during development.

Thank you.

@itsgoingd
itsgoingd merged commit c1d7fcf into itsgoingd:master Sep 14, 2025
@itsgoingd

Copy link
Copy Markdown
Owner

Thank you for the PR!

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