Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Assigned Identity Laravel Package

tseho/doctrine-assigned-identity

Doctrine ORM extension that lets entities use application-assigned identifiers—UUIDs, natural keys, or custom IDs—instead of database auto-increment, while keeping Doctrine's identity map and UnitOfWork working correctly.

Deep Wiki
Context7

Product Decisions This Supports

  • Test infrastructure investment: Supports a decision to reduce friction in Doctrine-based integration/unit tests by allowing fixtures to declare known entity IDs before persistence, instead of relying on database-generated IDs.
  • Build vs. buy vs. vendor: At ~10 stars, this is a candidate for vendoring a small internal helper rather than adopting a dependency. The functionality is narrowly scoped and likely easy to reproduce in-house if the team already owns Doctrine test utilities.
  • Developer productivity roadmap: Justifies a small test-tooling budget item if teams repeatedly write custom ID-assignment boilerplate or brittle post-flush ID lookup logic.
  • Deterministic test data: Enables stable assertions against URLs, API payloads, audit records, and cross-entity references where IDs must be known before flush().
  • Framework-fit decision: Only relevant if the product uses Doctrine ORM. It does not support Laravel’s default Eloquent-based testing strategy, so it should not be adopted as a general Laravel testing standard.
  • Use cases: Doctrine fixture loading, seed data for integration tests, legacy/Symfony-style components inside a PHP estate, and test suites that need fixed IDs for referential assertions.

When to Consider This Package

Consider it when:

  • The codebase uses Doctrine ORM, not Eloquent, for the entities under test.
  • Tests need to assign a primary key manually before persistence—typically because fixtures reference each other by fixed ID or assertions depend on known IDs.
  • The team is already comfortable with Doctrine’s identity-map and unit-of-work behavior.
  • You want a tiny, MIT-licensed utility and are prepared to pin, audit, and possibly fork it.
  • It replaces repeated custom test helpers and reduces boilerplate without changing production code paths.

Look elsewhere when:

  • The application is a standard Laravel/Eloquent project; this package is not a fit.
  • You need a broadly maintained, production-grade dependency with strong community support, release cadence, or security posture. Low stars and limited adoption are material risks.
  • IDs are UUIDs/ULIDs or generated by application-level strategies that already make IDs predictable.
  • Tests can simply persist, flush, and read back generated IDs; manual assignment adds risk without meaningful benefit.
  • The team cannot accept the maintenance burden of a small, low-activity package—especially for a capability that may be a few lines of internal test code.

How to Pitch It (Stakeholders)

Executive summary: This is a very small testing utility for Doctrine-based PHP applications. It lets test fixtures assign known entity IDs before saving, which can make integration tests simpler and assertions more deterministic. The business value is limited to developer productivity and test reliability—not customer-facing functionality.

Recommendation: Treat it as a low-risk, low-investment test helper, not a strategic dependency. Because adoption is minimal, engineering should evaluate whether an internal helper can deliver the same behavior with less supply-chain and maintenance risk. If adopted, pin the version, isolate it to test code, and document an exit path.

For engineering: It solves a narrow Doctrine testing problem: known IDs before persistence. Validate it against your Doctrine version and unit-of-work patterns, confirm it does not mask production identity-generation behavior, and prefer vendoring or an internal utility if the implementation is trivial. Do not position it as a Laravel-wide testing standard.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast