PHPackages                             dtforce/nette-doctrine - 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. [Framework](/categories/framework)
4. /
5. dtforce/nette-doctrine

ActiveLibrary[Framework](/categories/framework)

dtforce/nette-doctrine
======================

A lightweight Doctrine integration extension for Nette framework.

v1.0.0(9y ago)47111LGPL-2.1PHPPHP &gt;=5.4

Since Nov 22Pushed 8y ago3 watchersCompare

[ Source](https://github.com/DTForce/nette-doctrine)[ Packagist](https://packagist.org/packages/dtforce/nette-doctrine)[ RSS](/packages/dtforce-nette-doctrine/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (9)Used By (1)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cee37757174931cd4d1384220f7d341da78bae56fa4f7509c02077bbdd2bfacd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4454466f7263652f6e657474652d646f637472696e652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DTForce/nette-doctrine/?branch=master)

nette-doctrine
==============

[](#nette-doctrine)

A lightweight Doctrine integration extension for Nette framework. This extension is a replacement of Kdyby\\Doctrine, suitable for those who want to use native Doctrine classes and don't want register entity manager in the Nette service container themselves. It is compatible with Kdyby\\Console.

Configuration
-------------

[](#configuration)

Add extension to Nette project like this:

```
extensions:
	doctrine: DTForce\DoctrineExtension\DI\DoctrineExtension
```

Configure Doctrine access and other parameters like this:

```
doctrine:
	connection:
		driver: pdo_pgsql
		host: localhost
		port: 5432
		user: username
		password: password
		dbname: database

	debug: true
	prefix: doctrine.default
	proxyDir: %tempDir%/cache/proxies
	sourceDir: %appDir%/Entity

	dbal:
		types:
			dateinterval: App\Doctrine\Postgresql\Types\DateIntervalType
		type_overrides:
			date: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeImmutableType
			datetime: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeImmutableType
			datetimetz: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeTzImmutableType
		schema_filter: "~^(?!nd_)~" # tables and sequences that start with nd_ are ingored by Doctrine

	functions:
		CAST: App\Doctrine\Postgresql\Functions\Cast
```

Tweaking
--------

[](#tweaking)

### Mapping classes

[](#mapping-classes)

To create mapping between classes used in annotations and the actually instantiated classes create a Nette extension implementing `IClassMappingProvider`. Method `getClassnameToClassnameMapping` is expected to return mapping using class used for annotations as its key and class actually instantiated as the associated value.

### Adding entity source directories

[](#adding-entity-source-directories)

To register different source directories for different extensions, let your extension implement `IEntitySourceProvider`. Method `getEntityFolderMappings` is expected to return list of folders, where Doctrine entities can be found. Key of the returned array is ignored.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~54 days

Recently: every ~94 days

Total

8

Last Release

3493d ago

Major Versions

v0.2.1 → v1.0.02016-12-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1552179?v=4)[Jan Mareš](/maintainers/maresja1)[@maresja1](https://github.com/maresja1)

---

Top Contributors

[![maresja1](https://avatars.githubusercontent.com/u/1552179?v=4)](https://github.com/maresja1 "maresja1 (4 commits)")[![mortam](https://avatars.githubusercontent.com/u/24390291?v=4)](https://github.com/mortam "mortam (2 commits)")

### Embed Badge

![Health badge](/badges/dtforce-nette-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/dtforce-nette-doctrine/health.svg)](https://phpackages.com/packages/dtforce-nette-doctrine)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M464](/packages/pimcore-pimcore)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)[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.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

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