Manifests, Failed Rows, and Database Cursors
Use the format-neutral support classes for durable progress state, failed-row CSV output, and forward-only PDO exports.
Updated
LargeImportManifestLargeFailedRowsCsvWriterLargePdoCursorWhat you will learn
- Persist import progress independently from a specific spreadsheet reader.
- Write failed rows in a durable user-reviewable format.
- Stream database query results into export writers.
Persist resumable progress#
use Mnb\PHPExcel\Large\LargeImportManifest;
$manifest = new LargeImportManifest(__DIR__ . '/storage/import.json');
$manifest->start([
'source_path' => $sourcePath,
'table' => 'orders',
'status' => 'running',
]);
$manifest->update([
'chunks_completed' => 4,
'last_row_number' => 4001,
]);Keep the integration boundary clear#
Design resumability at the data layer#
- Use stable unique keys and database constraints.
- Choose duplicate behavior that safely tolerates replay.
- Store manifests and failed-row files in private durable storage.
- Fingerprint the source file and effective configuration.
- Treat progress callbacks as observability, not authoritative resume state.
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue