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

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

teamq-ec/teamq-doctrine-behaviors
=================================

Doctrine Behavior Traits for Symfony: Translatable

v2.0.0(10mo ago)0111MITPHPPHP &gt;=8.0

Since May 30Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/teamq-ec/teamq-doctrine-behaviors)[ Packagist](https://packagist.org/packages/teamq-ec/teamq-doctrine-behaviors)[ Docs](https://teamq.biz)[ RSS](/packages/teamq-ec-teamq-doctrine-behaviors/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (28)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/be78c7d34f748df791c0b853f316955ee4cad8615afa5b30338ad4fe27bac96d/68747470733a2f2f7465616d712e62697a2f77702d636f6e74656e742f75706c6f6164732f323032302f30332f7465616d71322e706e67)](https://teamq.biz)

Developing Dreams
=================

[](#developing-dreams)

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

[](#doctrine-behaviors)

This PHP library is a collection of traits and interfaces that add behaviors translataions to Doctrine entities and repositories, project based in package *[knplabs/doctrine-behaviors](https://github.com/KnpLabs/DoctrineBehaviors)*

It currently handles:

- [Translatable](/docs/translatable.md)

Install
-------

[](#install)

```
composer teamq-ec/teamq-doctrine-behaviors
```

Usage
-----

[](#usage)

All you have to do is to define a Doctrine entity:

- implemented interface
- add a trait

Voilà!

You now have a working `Category` that behaves like.

PHPStan
-------

[](#phpstan)

A PHPStan extension is available and provides the following features:

- Provides correct return type for `TranslatableInterface::getTranslations()` and `TranslatableInterface::getNewTranslations()`
- Provides correct return type for `TranslatableInterface::translate()`
- Provides correct return type for `TranslationInterface::getTranslatable()`

Include `phpstan-extension.neon` in your project's PHPStan config:

```
# phpstan.neon
includes:
    - vendor/teamq-ec/teamq-doctrine-behaviors/phpstan-extension.neon
```

3 Steps to Contribute
---------------------

[](#3-steps-to-contribute)

- **1 feature per pull-request**
- **New feature needs tests**
- Tests and static analysis **must pass**:

    ```
    vendor/bin/phpunit
    composer fix-cs
    composer phpstan
    ```

Upgrade 1.x to 2
----------------

[](#upgrade-1x-to-2)

There have been many changes between 1 and 2, but don't worry. This package uses [Rector](https://github.com/rectorphp/rector), that handles upgrade for you.

```
composer require rector/rector --dev
```

Create `rector.php` config:

```
vendor/bin/rector init
```

Add Doctrine Behaviors upgrade set to `rector.php`:

```
use Rector\Core\Configuration\Option;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Rector\Doctrine\Set\DoctrineSetList;

return static function (ContainerConfigurator $containerConfigurator): void {
    $containerConfigurator->import(DoctrineSetList::DOCTRINE_BEHAVIORS_20);
};
```

Run Rector:

```
vendor/bin/rector process src
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance54

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

308d ago

Major Versions

v1.0.0 → v2.0.02025-07-08

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5067da7022cae6bdfae3c2af9ffd2292e29af34cb2681d2269a51e489c65085d?d=identicon)[manager@teamq.biz](/maintainers/manager@teamq.biz)

---

Top Contributors

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

---

Tags

doctrinebehaviorstranslatable

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

92212.7M64](/packages/knplabs-doctrine-behaviors)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[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)

PHPackages © 2026

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