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(7y ago)1016.1k↓11.1%[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 1mo 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 60% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

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

2869d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bd2f5fae8c4ffe54672f7babe9a0942fb72f16572c0c989889d912dc959e050?d=identicon)[tseho](/maintainers/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

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[pixelfederation/doctrine-resettable-em-bundle

Symfony bundle for decorating default entity managers using a resettable decorator.

20113.5k](/packages/pixelfederation-doctrine-resettable-em-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.

1022.4k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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