PHPackages                             tseho/doctrine-assigned-identity - 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. [Database &amp; ORM](/categories/database)
4. /
5. tseho/doctrine-assigned-identity

ActiveLibrary[Database &amp; ORM](/categories/database)

tseho/doctrine-assigned-identity
================================

v0.1.0(8y ago)1016.4k↓33.3%[1 issues](https://github.com/tseho/doctrine-assigned-identity/issues)1MITPHPPHP &gt;=7.1

Since Jul 4Pushed 7y ago3 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (1)

doctrine-assigned-identity
==========================

[](#doctrine-assigned-identity)

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

[](#description)

This package allows you manually assign IDs to a Doctrine entity, even when the entity uses the stategies AUTO, SEQUENCE, IDENTITY or UUID.

This package's main use-case is to explicitly set IDs of entities that are created for your unit tests. It is not advised to use this package in production.

Installation
------------

[](#installation)

```
composer require --dev tseho/doctrine-assigned-identity

```

Usage
-----

[](#usage)

Register the EventListener in Doctrine.

#### With Symfony:

[](#with-symfony)

```
# app/config/config_test.yml

services:
    tseho.doctrine_assigned_identity.listener:
        class: Tseho\DoctrineAssignedIdentity\EventListener\AssignedIdentityListener
        public: false
        tags:
            - { name: doctrine.event_listener, event: prePersist }

```

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

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

`AssignedIdentityListener` will override the ID generator of an entity class if there is a newly persisted instance with a manually assigned id. For all the other instances of the same class without id, the `ChainedGenerator` will fallback on the correct id generator.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2922d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1421130?v=4)[Quentin Favrie](/maintainers/tseho)[@tseho](https://github.com/tseho)

---

Top Contributors

[![tseho](https://avatars.githubusercontent.com/u/1421130?v=4)](https://github.com/tseho "tseho (8 commits)")

### Embed Badge

![Health badge](/badges/tseho-doctrine-assigned-identity/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/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.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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