---
name: Doctrine Transactions
slug: doctrine-transactions
category: Quality
description: Doctrine Transactions handles Doctrine ORM transaction boundaries, optimistic and pessimistic locking, and flush strategies in Symfony. Use it when modeling entity changes, migrations, or correcting integrity and performance issues.
github: "https://github.com/dev-toolings/superpowers-symfony/tree/main/skills/doctrine-transactions"
language: TypeScript
stars: 208
forks: 20
install: "npx degit https://github.com/dev-toolings/superpowers-symfony/tree/main/skills/doctrine-transactions ~/.claude/skills/doctrine-transactions"
installs_to: ~/.claude/skills/doctrine-transactions
source_path: skills/doctrine-transactions/SKILL.md
collection_size: 23
category_size: 1557
collection_url: "https://dirskills.com/collections/dev-toolings/superpowers-symfony"
added: 2026-09-04T05:27:07.680Z
last_synced: 2026-09-04T05:27:07.680Z
canonical_url: "https://dirskills.com/skills/doctrine-transactions"
---

# Doctrine Transactions

Doctrine Transactions handles Doctrine ORM transaction boundaries, optimistic and pessimistic locking, and flush strategies in Symfony. Use it when modeling entity changes, migrations, or correcting integrity and performance issues.

**Install:**

```bash
npx degit https://github.com/dev-toolings/superpowers-symfony/tree/main/skills/doctrine-transactions ~/.claude/skills/doctrine-transactions
```

## README

# Doctrine Transactions (Symfony)

## Use when
- Designing entity relations or schema evolution.
- Improving Doctrine correctness/performance.

## Default workflow
1. Model ownership/cardinality and transactional boundaries.
2. Apply mapping/schema changes with migration safety.
3. Tune fetch/query behavior for hot paths.
4. Verify lifecycle behavior with targeted tests.

## Guardrails
- Keep owning/inverse sides coherent.
- Avoid destructive migration jumps in one release.
- Eliminate accidental N+1 and over-fetching.

## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.

## Output contract
- Entity/migration changes.
- Integrity and performance decisions.
- Validation outcomes and rollback notes.

## References
- `reference.md`
- `docs/complexity-tiers.md`
