eventjet/psr-container-doctrine-odm

Doctrine ODM factory for PSR-11 container

Installs: 507

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/eventjet/psr-container-doctrine-odm

0.1.0 2021-08-01 15:17 UTC

This package is auto-updated.

Last update: 2025-09-27 21:26:10 UTC


README

This package provides additional factories for Doctrine MongoDB ODM on top of roave/psr-container-doctrine to be used with containers using the PSR-11 standard.

Installation

$ composer require eventjet/psr-container-doctrine-odm

Configuration

The most basic way is just defining the factory for the DocumentManager. Everything else is taken from the configuration.

return [
    'dependencies' => [
        'factories' => [
           DocumentManager::class => DocumentManagerFactory::class,
        ],
    ],
];

Example Configuration

A full example of the configuration can be found in the examples folder.

The configuration style is heavily based on roave/psr-container-doctrine to retain the familiarity. Also, the configuration should be compatible with the 'DoctrineMongoODMModule for Laminas.