Skip to content
Development
Skill

/doctrine-batch-processing

Process large datasets with Doctrine (ORM 3 toIterable, flush+clear, bulk DQL) and memory management

From plugin
superpowers-symfony
22744 skills14 agents13 commands1 hook

Claude Code

$ npx -y skills add dev-toolings/superpowers-symfony --skill doctrine-batch-processing --agent claude-code

SKILL.md

doctrine-batch-processing.SKILL.md
name: doctrine-batch-processing
description: Process large datasets with Doctrine (ORM 3 toIterable, flush+clear, bulk DQL) and memory management
capabilities: [read, search, edit, shell]
tags: [doctrine, performance]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
  - Write
  - Edit
  - Bash

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.

Guardrails

  • Never `findAll()` on a table that grows.
  • Entities loaded before a `clear()` are detached: do not modify or persist them.
  • Bulk DQL and DBAL skip lifecycle events and listeners. Check what relies on them.
  • On ORM 3, `Query#iterate()` and `setSQLLogger()` are gone: use `toIterable()` and a logging middleware.
  • Paginate by id rather than by offset: offsets get slower and skip rows when data moves.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • A batch loop with an explicit batch size and clear points.
  • The choice between ORM, DQL bulk and DBAL for each write, with the reason.
  • Memory measurements before and after on a realistic volume.

References

  • `reference.md`
Read more
@dev-toolings
Ships withsuperpowers-symfony

Superpowers Symfony gives coding agents deep, version-accurate Symfony expertise: from Doctrine schema design and API Platform REST/GraphQL APIs to test-driven development, async Messenger workflows, caching, rate limiting, and clean architecture.

22744 skills14 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
227
Star history of dev-toolings/superpowers-symfony on GitHub, a chart by star-history.com

Other skills on superpowers-symfony.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react3d252k
@facebook@facebookInstall Skill

Questions about doctrine-batch-processing.

Which coding agents can use doctrine-batch-processing?
doctrine-batch-processing installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.