PHPackages                             thomasvargiu/laminas-manager-registry - 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. thomasvargiu/laminas-manager-registry

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

thomasvargiu/laminas-manager-registry
=====================================

Doctrine Manager Registry for Laminas

0.1.0(5y ago)110MITPHPPHP ^7.2CI failing

Since Jul 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thomasvargiu/laminas-manager-registry)[ Packagist](https://packagist.org/packages/thomasvargiu/laminas-manager-registry)[ RSS](/packages/thomasvargiu-laminas-manager-registry/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (12)Versions (2)Used By (0)

Doctrine Manager Registry for Laminas apps
==========================================

[](#doctrine-manager-registry-for-laminas-apps)

Install
-------

[](#install)

```
$ composer require thomasvargiu/laminas-manager-registry

```

Configuration
-------------

[](#configuration)

```
use TMV\Laminas\ManagerRegistry\EntityRepositoryFactory;
use TMV\Laminas\ManagerRegistry\ManagerRegistryConfigFactory;

return [
    ManagerRegistryConfigFactory::class => [
        'connections' => [
            'connection1' => 'doctrine.connection.orm_default',
            'connection2' => 'doctrine.connection.orm_another',
        ],
        'managers' => [
            'manager1' => 'doctrine.entitymanager.orm_default',
            'manager2' => 'doctrine.entitymanager.orm_another',
        ],
        'default_connection' => 'connection1', // optional, default to first connection
        'default_manager' => 'manager1', // optional, default to first manager
    ],
    'dependencies' => [
        'factories' => [
            // Create an EntityRepository service with a ManagerRegistry (see below)
            MyEntityRepository::class => new EntityRepositoryFactory(MyEntity::class),
        ],
    ],
];
```

Example on how to use it:
-------------------------

[](#example-on-how-to-use-it)

```
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManagerInterface;

/** @var ManagerRegistry $managerRegistry */
$managerRegistry = $container->get(ManagerRegistry::class);
/** @var EntityManagerInterface $entityManager */
$entityManager = $managerRegistry->getManager(/*  */);

if (! $entityManager->isOpen()) {
    /** @var EntityManagerInterface $entityManager */
    $entityManager = $managerRegistry->resetManager(/*  */);
}
```

Repository
----------

[](#repository)

If you want to inject repositories in your services, you can extend the `TMV\Laminas\ManagerRegistry\EntityRepository`:

```
use TMV\Laminas\ManagerRegistry\EntityRepository;

class MyRepository extends EntityRepository
{
    public function findByMyCriteria(string $value)
    {
        return $this->findBy(['my_criteria' => $value]) ;
    }

    public function anotherMethod(): void
    {
        // get the doctrine EntityRepository, using the ManagerRegistry
        $doctrineRepository = $this->getRepository();
        // get the EntityManager, using the ManagerRegistry
        $entityManager = $this->getEntityManager();
    }
}
```

To instantiate your repository you can register a service using the serializable `TMV\Laminas\ManagerRegistry\EntityRepositoryFactory` factory:

```
use TMV\Laminas\ManagerRegistry\EntityRepositoryFactory;
use TMV\Laminas\ManagerRegistry\ManagerRegistryConfigFactory;

return [
    'dependencies' => [
        'factories' => [
            MyRepository::class => new EntityRepositoryFactory(MyEntity::class /*,  */),
        ],
    ],
];
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

2139d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laminasdoctrinemanagerrepositorymanager registry

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thomasvargiu-laminas-manager-registry/health.svg)

```
[![Health](https://phpackages.com/badges/thomasvargiu-laminas-manager-registry/health.svg)](https://phpackages.com/packages/thomasvargiu-laminas-manager-registry)
```

###  Alternatives

[doctrine/doctrine-orm-module

Laminas Module that provides Doctrine ORM functionality

4407.3M293](/packages/doctrine-doctrine-orm-module)[doctrine/doctrine-module

Laminas Module that provides Doctrine basic functionality required for ORM and ODM modules

3957.9M116](/packages/doctrine-doctrine-module)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[happyr/doctrine-specification

Specification Pattern for your Doctrine repositories

452915.0k8](/packages/happyr-doctrine-specification)[doctrine/doctrine-mongo-odm-module

Laminas Module which provides Doctrine MongoDB ODM functionality

86676.6k35](/packages/doctrine-doctrine-mongo-odm-module)[doctrine/doctrine-laminas-hydrator

Doctrine hydrators for Laminas applications

362.8M19](/packages/doctrine-doctrine-laminas-hydrator)

PHPackages © 2026

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