PHPackages                             setono/doctrine-orm-trait - 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. setono/doctrine-orm-trait

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

setono/doctrine-orm-trait
=========================

A very simple library that offers a trait to get the object manager and repository for a given class

v1.2.0(1y ago)066.0k↓37.4%10MITPHPPHP &gt;=8.1CI passing

Since Apr 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Setono/doctrine-orm-trait)[ Packagist](https://packagist.org/packages/setono/doctrine-orm-trait)[ GitHub Sponsors](https://github.com/Setono)[ RSS](/packages/setono-doctrine-orm-trait/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (5)Used By (10)

Doctrine ORM Trait
==================

[](#doctrine-orm-trait)

[![Latest Version](https://camo.githubusercontent.com/d43643a788d9d8d418587a2da4162f93877269d391e6a004ddc0b4ce12c666a0/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f646f637472696e652d6f726d2d74726169742f762f737461626c65)](https://packagist.org/packages/setono/doctrine-orm-trait)[![Software License](https://camo.githubusercontent.com/e3ac2eeadf88dbc2edb010a243dab9c522b0f8568e123bddb1ef74a61035e80f/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f646f637472696e652d6f726d2d74726169742f6c6963656e7365)](LICENSE)[![Build Status](https://github.com/Setono/doctrine-orm-trait/workflows/build/badge.svg)](https://github.com/Setono/doctrine-orm-trait/actions)[![Code Coverage](https://camo.githubusercontent.com/d1eebff42886e995a0bc6fff0ea932e54b441132369d2efba2e62616ef36babb/68747470733a2f2f636f6465636f762e696f2f67682f5365746f6e6f2f646f637472696e652d6f726d2d74726169742f67726170682f62616467652e737667)](https://codecov.io/gh/Setono/doctrine-orm-trait)[![Mutation testing](https://camo.githubusercontent.com/9109155b7914d68ce4db1a3abfe397fdd0ee4f7d7a3a2c0151eb4e7d7009ecdd/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532465365746f6e6f253246646f637472696e652d6f726d2d74726169742532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/Setono/doctrine-orm-trait/master)

If you are like and me and usually [don't inject entity managers directly](https://matthiasnoback.nl/2014/05/inject-the-manager-registry-instead-of-the-entity-manager/), but inject the manager registry instead then this little library will come in handy.

Installation
------------

[](#installation)

```
composer require setono/doctrine-orm-trait
```

Usage
-----

[](#usage)

```
