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)37111LGPL-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 2mo 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 68% 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

3447d ago

Major Versions

v0.2.1 → v1.0.02016-12-05

### Community

Maintainers

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

[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[open-dxp/opendxp

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

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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