PHPackages                             martinadamec/doctrine-behaviors - 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. martinadamec/doctrine-behaviors

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

martinadamec/doctrine-behaviors
===============================

Integration of KnpLabs/DoctrineBehaviors to Nette\\DI

v5.0.0(6y ago)010MITPHPPHP ~7.4

Since Jun 21Pushed 6y agoCompare

[ Source](https://github.com/martinadamec/DoctrineBehaviors)[ Packagist](https://packagist.org/packages/martinadamec/doctrine-behaviors)[ RSS](/packages/martinadamec-doctrine-behaviors/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (35)Used By (0)

Doctrine Behaviors
==================

[](#doctrine-behaviors)

[![Latest stable](https://camo.githubusercontent.com/4d4e114e3f808213e0539afe36e8e12a0e3bab4ecd846c8ae36e74648158e151/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617274696e6164616d65632f646f637472696e652d6265686176696f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/martinadamec/doctrine-behaviors)

Port of [KnpLabs/DoctrineBehaviors](https://github.com/KnpLabs/DoctrineBehaviors) to Nette DI

Supported behaviors:

- Translatable

Install
-------

[](#install)

Via Composer:

```
$ composer require martinadamec/doctrine-behaviors
```

Register extensions you need in `config.neon`:

```
extensions:
	translatable: Zenify\DoctrineBehaviors\DI\TranslatableExtension
```

Usage
-----

[](#usage)

### Translatable

[](#translatable)

Setup your translator locale callback in `config.neon`:

```
translatable:
	currentLocaleCallable: [@Translator, getLocale]
```

Place trait to your entity:

```
class Article
{

	use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
	// returns translated property for $article->getTitle() or $article->title
	use MartinAdamec\DoctrineBehaviors\Entities\Attributes\Translatable;

}
```

And its translation entity:

```
class ArticleTranslation
{

	use Knp\DoctrineBehaviors\Model\Translatable\Translation;

	/**
	 * @ORM\Column(type="string")
	 * @var string
	 */
	public $title;

}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity75

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 ~66 days

Recently: every ~321 days

Total

33

Last Release

2213d ago

Major Versions

v1.2.2 → v2.0.02014-12-09

v2.6.0 → v4.12016-12-28

v4.2 → v5.0.02020-04-21

PHP version history (5 changes)v1.0.0PHP &gt;=5.4

v2.0.0PHP &gt;=5.5

v2.2.0PHP &gt;=5.6

v2.6.0PHP ^7.0

v5.0.0PHP ~7.4

### Community

Maintainers

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

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (4 commits)")[![martinadamec](https://avatars.githubusercontent.com/u/12466690?v=4)](https://github.com/martinadamec "martinadamec (2 commits)")

### Embed Badge

![Health badge](/badges/martinadamec-doctrine-behaviors/health.svg)

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

PHPackages © 2026

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