PHPackages                             nalgoo/doctrine-custom-schema - 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. nalgoo/doctrine-custom-schema

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

nalgoo/doctrine-custom-schema
=============================

Custom annotations for extending schema generation of Doctrine's SchemaTool

3.0.0(3y ago)0641MITPHPPHP &gt;=8.0

Since Mar 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nalgoo/doctrine-custom-schema)[ Packagist](https://packagist.org/packages/nalgoo/doctrine-custom-schema)[ RSS](/packages/nalgoo-doctrine-custom-schema/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (6)Used By (0)

Custom Schema for Doctrine
==========================

[](#custom-schema-for-doctrine)

This package allows you to define custom schema on top of your ORM model. For instance, creating foreign keys without the need of `JoinColumn`.

Install via Composer
--------------------

[](#install-via-composer)

```
composer require nalgoo/doctrine-custom-schema

```

Usage
-----

[](#usage)

```
$entityManager = EntityManager::create(...);

CustomSchemaListener::register($entityManager);

```

Annotations
-----------

[](#annotations)

### ForeignKey

[](#foreignkey)

```
class Entity
{
	/**
	 * @ORM\Column(name="user_id", type="integer", nullable=false)
	 * @ForeignKey(refTable="user", refColumn="id", onUpdate="CASCADE", onDelete="CASCADE")
	 */
	public int $userId;
}

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Every ~102 days

Total

5

Last Release

1155d ago

Major Versions

1.1.0 → 2.0.02022-11-10

2.1.0 → 3.0.02023-05-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/45479117045e318b73b42b47cff564fe1c0b16079a1feed4eaeea7c49adf8a4a?d=identicon)[nalgoo](/maintainers/nalgoo)

---

Top Contributors

[![senasi](https://avatars.githubusercontent.com/u/12956618?v=4)](https://github.com/senasi "senasi (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nalgoo-doctrine-custom-schema/health.svg)

```
[![Health](https://phpackages.com/badges/nalgoo-doctrine-custom-schema/health.svg)](https://phpackages.com/packages/nalgoo-doctrine-custom-schema)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M733](/packages/sylius-sylius)[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)[concrete5/core

Concrete core subtree split

20166.1k50](/packages/concrete5-core)

PHPackages © 2026

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