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 1mo ago

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 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

1104d 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

[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)[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)[opensolutions/doctrine2bridge

Adds the the power of Doctrine2 to Laravel 4 (with support for SQL logging and authentication)

133.7k](/packages/opensolutions-doctrine2bridge)

PHPackages © 2026

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