PHPackages                             njr03304/doctrine-repository-bundle - 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. njr03304/doctrine-repository-bundle

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

njr03304/doctrine-repository-bundle
===================================

Symfony njr03304 DoctrineRepositoryBundle

08PHP

Since Sep 17Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Installation
============

[](#installation)

Currently, this project just includes a single trait to use in a Doctrine repository.

Step 1: Download the Bundle
---------------------------

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require njr03304/doctrine-repository-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Usage
-----

[](#usage)

```
namespace AppBundle\Repository;

use njr03304\DoctrineRepositoryBundle\Repository\Traits\FindAndCreateTrait;

class TagRepository extends \Doctrine\ORM\EntityRepository
{
    use FindAndCreateTrait;
}
```

```
$entity = $em->getRepository('AppBundle:Tag')->findByElseCreate(array('name' => 'example'));
```

$entity will now be and instance of AppBundle\\Entity\\Tag with a name of 'example', either from the DB or a new instance ready to be saved to the DB.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1675311?v=4)[njr03304](/maintainers/njr03304)[@njr03304](https://github.com/njr03304)

### Embed Badge

![Health badge](/badges/njr03304-doctrine-repository-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/njr03304-doctrine-repository-bundle/health.svg)](https://phpackages.com/packages/njr03304-doctrine-repository-bundle)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M115](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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