doctrine-batch-processing

Installation
SKILL.md

Doctrine Batch Processing (Symfony)

Use when

  • Processing more rows than fit in memory: imports, exports, backfills.
  • A command or worker runs out of memory iterating over entities.
  • Updating or deleting many rows at once.
  • Inserting large volumes through Doctrine or DBAL.

Default workflow

  1. Measure the dataset size and the memory budget of the process.
  2. Stream reads with toIterable(), or paginate by id (id > :lastId) for very large tables.
  3. Flush and clear() every N items, and re-fetch anything needed after a clear.
  4. Use DQL UPDATE/DELETE or DBAL for bulk writes that need no hydration.
  5. Log memory usage and progress, and make the run resumable.
Installs
73
GitHub Stars
224
First Seen
Sep 18, 2026