-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add AfterChunk event for chunked exports #4037
Add AfterChunk event for chunked exports #4037
Conversation
Add AfterChunk event for chunked exports
Could you add a test for this event in https://github.com/SpartnerNL/Laravel-Excel/blob/3.1/tests/Concerns/WithEventsTest.php |
Hi, thanks for considering this PR. I have added a test, I hope this is how you wanted. Cheers, Sebi |
Hi @patrickbrouwers, do you need anything else here? |
public function export_chunked_events_get_called() | ||
{ | ||
$this->loadLaravelMigrations(['--database' => 'testing']); | ||
User::query()->create([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we could create 2 users here,
Do a chunk export with chunk size 1
Then we could do an additional assert that the chunk event was raised twice, I think. Could you check if that's possible.
Improved the test myself |
fixes #3606
Add AfterChunk event for chunked exports
This PR allows the AfterChunk event to fire on chunked queued exports.
#3634
1️⃣ Why should it be added? What are the benefits of this change?
With this, it is possible to
2️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out.
No
3️⃣ Does it include tests, if possible?
No
4️⃣ Any drawbacks? Possible breaking changes?
No breaking changes.
5️⃣ Mark the following tasks as done:
6️⃣ Thanks for contributing! 🙌