PHPackages                             maduser/argon-doctrine - 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. maduser/argon-doctrine

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

maduser/argon-doctrine
======================

Doctrine ORM integration for the Argon runtime stack.

v1.0.0(2mo ago)00MITPHPPHP ^8.2CI passing

Since May 25Pushed 2mo agoCompare

[ Source](https://github.com/judus/argon-doctrine)[ Packagist](https://packagist.org/packages/maduser/argon-doctrine)[ RSS](/packages/maduser-argon-doctrine/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

argon-doctrine
==============

[](#argon-doctrine)

[![PHP](https://camo.githubusercontent.com/ce3e396e4f1bbbd326f628872a1414656d28065f2712cda0868d8eff07320aec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322b2d626c7565)](https://www.php.net/)[![Build](https://github.com/judus/argon-doctrine/actions/workflows/php.yml/badge.svg?branch=main)](https://github.com/judus/argon-doctrine/actions)[![codecov](https://camo.githubusercontent.com/8932b83a7dfc0f726bcdc40ab3d290bf7b495f064ce5185ae48f536187b42046/68747470733a2f2f636f6465636f762e696f2f67682f6a756475732f6172676f6e2d646f637472696e652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/judus/argon-doctrine)[![Psalm Level](https://camo.githubusercontent.com/eed3addd9d055a7643b72275dc10ca6bbba0030f5620e7daec213a6e3bc1309a/68747470733a2f2f73686570686572642e6465762f6769746875622f6a756475732f6172676f6e2d646f637472696e652f636f7665726167652e737667)](https://shepherd.dev/github/judus/argon-doctrine)[![Latest Version](https://camo.githubusercontent.com/9a4a84010c3e0f84d88e609048a0782744775b9a1510be2590641d7526e3a1a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6164757365722f6172676f6e2d646f637472696e652e737667)](https://packagist.org/packages/maduser/argon-doctrine)[![Total Downloads](https://camo.githubusercontent.com/8256316a4d106b8eb07d610355871724ea9d6162bb6b8e585c9fe802472816c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6164757365722f6172676f6e2d646f637472696e652e7376673f636f6c6f723d626c7565)](https://packagist.org/packages/maduser/argon-doctrine)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Doctrine ORM integration for the Argon runtime stack.

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

[](#installation)

```
composer require maduser/argon-doctrine
```

Registration
------------

[](#registration)

Register the service provider in your application composition layer:

```
use Maduser\Argon\Doctrine\Provider\DoctrineServiceProvider;

$container->register(DoctrineServiceProvider::class);
```

The provider registers:

- `Doctrine\ORM\EntityManagerInterface`
- `Maduser\Argon\Doctrine\DoctrineEntityManagerRegistry`
- `Maduser\Argon\Doctrine\DoctrineEntityManagerDefinitionRegistry`
- `Maduser\Argon\Doctrine\Config\DoctrineConfig`

Existing container definitions are not replaced.

Entity Managers
---------------

[](#entity-managers)

Add entity manager definitions during service-provider registration:

```
use Maduser\Argon\Container\AbstractServiceProvider;
use Maduser\Argon\Container\ArgonContainer;
use Maduser\Argon\Doctrine\DoctrineEntityManagerDefinitionRegistry;

final class DoctrineMappingServiceProvider extends AbstractServiceProvider
{
    #[\Override]
    public function register(ArgonContainer $container): void
    {
        $registry = $container->get(DoctrineEntityManagerDefinitionRegistry::class);

        $registry->add(
            name: 'default',
            connectionParams: [
                'driver' => 'pdo_sqlite',
                'path' => dirname(__DIR__) . '/storage/database.sqlite',
            ],
            mappingPaths: [
                dirname(__DIR__) . '/src',
            ],
        );

        $registry->add(
            name: 'analytics',
            connectionParams: [
                'driver' => 'pdo_mysql',
                'host' => '127.0.0.1',
                'dbname' => 'analytics',
                'user' => 'app',
                'password' => '',
                'charset' => 'utf8mb4',
            ],
            mappingPaths: [
                dirname(__DIR__) . '/src/Analytics',
            ],
            devMode: false,
            cacheNamespaceSeed: 'analytics',
            proxyDir: dirname(__DIR__) . '/storage/cache/doctrine/proxies',
        );
    }
}
```

The default manager name is `default`. Configure another default explicitly:

```
use Maduser\Argon\Doctrine\Config\DoctrineParameter;

$container->getParameters()->set(DoctrineParameter::DEFAULT_MANAGER, 'analytics');
```

Usage
-----

[](#usage)

Inject Doctrine's default entity manager:

```
use Doctrine\ORM\EntityManagerInterface;

final readonly class UserRepository
{
    public function __construct(
        private EntityManagerInterface $manager,
    ) {
    }
}
```

For multiple managers, inject the registry:

```
use Maduser\Argon\Doctrine\DoctrineEntityManagerRegistry;

$default = $registry->get();
$analytics = $registry->get('analytics');
```

Managers are created lazily when first resolved. Register manager definitions before resolving `EntityManagerInterface` or calling `$registry->get()`.

Mapping
-------

[](#mapping)

This package configures Doctrine ORM attribute metadata through `ORMSetup::createAttributeMetadataConfig()`. It does not configure XML, YAML, annotation drivers, or automatic mapping discovery.

Boundaries
----------

[](#boundaries)

This package only wires Doctrine ORM into Argon. It does not provide migrations, fixtures, repositories, DBAL-only abstractions, entity discovery, config-file loading, or transaction helpers.

Quality Gates
-------------

[](#quality-gates)

```
composer check
composer test:coverage
composer psalm
composer phpcs
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance88

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

60d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb9da5a15010d335622bf9f465a32ef79c8d1cffcd139c2a9114736b72e2c13?d=identicon)[jdu](/maintainers/jdu)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/maduser-argon-doctrine/health.svg)

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

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M400](/packages/easycorp-easyadmin-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M511](/packages/pimcore-pimcore)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[sulu/sulu

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

1.3k1.4M215](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.2k18.1k](/packages/prestashop-prestashop)

PHPackages © 2026

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