PHPackages                             villermen/doctrine-identity-queuer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. villermen/doctrine-identity-queuer

ActiveLibrary[Queues &amp; Workers](/categories/queues)

villermen/doctrine-identity-queuer
==================================

v1.1.0(3mo ago)2587MITPHPPHP &gt;=8.4CI passing

Since Mar 4Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/villermen/doctrine-identity-queuer)[ Packagist](https://packagist.org/packages/villermen/doctrine-identity-queuer)[ RSS](/packages/villermen-doctrine-identity-queuer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

doctrine-identity-queuer
========================

[](#doctrine-identity-queuer)

#### Queue IDs for your next inserted entities.

[](#queue-ids-for-your-next-inserted-entities)

[![Test](https://github.com/villermen/doctrine-identity-queuer/actions/workflows/test.yml/badge.svg)](https://github.com/villermen/doctrine-identity-queuer/actions/workflows/test.yml)

Description
-----------

[](#description)

This package adds an `IdentityQueuer` class, that allows you to set identities (IDs) of Doctrine entities in advance. It is able to do this for entities that are configured to have a different identity generation strategy.

This package's main use-case is to explicitly set IDs of entities that are created somewhere in your services during unit tests. It is not advised to use this package in production, as there are better ways of achieving custom ID generation outside of testing.

Usage
-----

[](#usage)

```
use Villermen\DoctrineIdentityQueuer\IdentityQueuer;

$identityQueuer = new IdentityQueuer($entityManager);
$identityQueuer->queueIdentity(User::class, 1234);

$user = new User()

$entityManager->persist($user);
$entityManager->flush();

// $user should have been given an id of 1234 instead of an automatically generated one!
```

Installing
----------

[](#installing)

`composer require --dev villermen/doctrine-identity-queuer`

How does it work?
-----------------

[](#how-does-it-work)

`IdentityQueuer` will override the ID generator for entities when there are queued identities waiting for them. It subscribes to Doctrine's `preFlush` event to flush the entities with queued identies first, before performing the actual flush. Before performing the actual flush, the generators are changed back so that additional entities will behave like they originally would.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1470 days

Total

3

Last Release

100d ago

PHP version history (2 changes)v1.0.1PHP &gt;=7.1

v1.1.0PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1106303?v=4)[Sjoerd Nuijten](/maintainers/Villermen)[@villermen](https://github.com/villermen)

---

Top Contributors

[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/villermen-doctrine-identity-queuer/health.svg)

```
[![Health](https://phpackages.com/badges/villermen-doctrine-identity-queuer/health.svg)](https://phpackages.com/packages/villermen-doctrine-identity-queuer)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[api-platform/doctrine-orm

Doctrine ORM bridge

293.9M78](/packages/api-platform-doctrine-orm)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
