PHPackages                             cygnus/doctrine-magic-embed-bundle - 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. cygnus/doctrine-magic-embed-bundle

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

cygnus/doctrine-magic-embed-bundle
==================================

A Symfony2 bundle to support embedding a version of a first-class managed document

33

Since Feb 27Pushed 12y ago5 watchersCompare

[ Source](https://github.com/cygnusb2b/doctrine-magic-embed-bundle)[ Packagist](https://packagist.org/packages/cygnus/doctrine-magic-embed-bundle)[ RSS](/packages/cygnus-doctrine-magic-embed-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Doctrine Magic Embed
====================

[](#doctrine-magic-embed)

This bundle supports embedding a version of a first-class managed document in Doctrine documents.

[![Build Status](https://camo.githubusercontent.com/2b064cc267b0da34affb6b39737d759cb7f6bdd22a5f0c65cd0303f6c6fb2a36/68747470733a2f2f7472617669732d63692e6f72672f6379676e75736232622f646f637472696e652d6d616769632d656d6265642d62756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/cygnusb2b/doctrine-magic-embed-bundle)

---

### The Problem

[](#the-problem)

In Doctrine, managed documents cannot be easily embedded within other documents. In a blogging scenario, it would be useful to embed the post author on each Post document, both to prevent unnecessary database lookups and to easily access methods or properties of the author, once hydrated.

In Doctrine, you would need to either reference the Author document (causing a DB query), or embed an EmbeddedDocument version of the Author document (to which changes would not be persisted.) You may also want to specify what fields of the embedded document are actually embedded, which is not currently supported.

---

### The Solution

[](#the-solution)

This bundle attempts to remedy that problem by providing three things:

1. An annotation driver to define which fields should be used when embedding a document.
2. A service that hooks into Doctrine's hydration and persistance events to transform the passed document into a true embedded document based on the fields you have defined with the annotation driver.
3. Finally, a service that hooks into Doctrine's persistance functionality to cascade changes from managed documents to transformed embedded documents.

---

### Status

[](#status)

This bundle is currently under active development, and no stable release is yet available. If you're interested in learning more or contributing, feel free to check out the [documentation](Resources/doc/index.md) or the [wiki](https://github.com/cygnusb2b/doctrine-magic-embed-bundle/wiki).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6509ef0ef5c96a8623262b2cea39fae98de11e7a7d7daa99b5409c411b17019?d=identicon)[zarathustra323](/maintainers/zarathustra323)

![](https://www.gravatar.com/avatar/1edba31ec2714e8cfac7a4c1232c56cf40a26d154876c0d9b42d984944056758?d=identicon)[solocommand](/maintainers/solocommand)

---

Top Contributors

[![solocommand](https://avatars.githubusercontent.com/u/1778222?v=4)](https://github.com/solocommand "solocommand (9 commits)")

### Embed Badge

![Health badge](/badges/cygnus-doctrine-magic-embed-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/cygnus-doctrine-magic-embed-bundle/health.svg)](https://phpackages.com/packages/cygnus-doctrine-magic-embed-bundle)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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