You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1.56
What version of Laravel are you using?
9.52.16
What version of PHP are you using?
8.1
Describe your issue
I have an import which uses ShouldQueue together with chunk reading and batch inserts.
I want to get all the failures at AfterImport and save on database but the failures are empty. If I remove ShouldQueue its working ok.
How can the issue be reproduced?
Create an import that implements ShouldQueue, try to get the failures at AfterImport event.
class MembersDataImport implements ShouldQueue, SkipsEmptyRows, SkipsOnFailure, ToCollection, WithBatchInserts, WithChunkReading, WithEvents, WithHeadingRow, WithValidation
{
use Importable, SkipsFailures;
............
public function registerEvents(): array
{
return [
AfterImport::class => function (AfterImport $afterImport) {
if ($this->failures()
->isNotEmpty()) {
$this->storeFailures($this->failures());
}
},
];
}
public function chunkSize(): int
{
return 1000;
}
public function batchSize(): int
{
return 1000;
}
}
What should be the expected behaviour?
The failures should not be empty if the file has validation errors.
The text was updated successfully, but these errors were encountered:
This bug report has been automatically closed because it has not had recent activity. If this is still an active bug, please comment to reopen. Thank you for your contributions.
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.56
What version of Laravel are you using?
9.52.16
What version of PHP are you using?
8.1
Describe your issue
I have an import which uses ShouldQueue together with chunk reading and batch inserts.
I want to get all the failures at AfterImport and save on database but the failures are empty. If I remove ShouldQueue its working ok.
How can the issue be reproduced?
Create an import that implements ShouldQueue, try to get the failures at AfterImport event.
What should be the expected behaviour?
The failures should not be empty if the file has validation errors.
The text was updated successfully, but these errors were encountered: