PHPackages                             cubicmushroom/slim-middleware-doctrine-orm - 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. [Framework](/categories/framework)
4. /
5. cubicmushroom/slim-middleware-doctrine-orm

ActiveLibrary[Framework](/categories/framework)

cubicmushroom/slim-middleware-doctrine-orm
==========================================

Slim Framework Middleware to integrate Doctrine ORM

0.1.1(11y ago)01proprietaryPHP

Since Mar 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/cubicmushroom/slim-middleware-doctrine-orm)[ Packagist](https://packagist.org/packages/cubicmushroom/slim-middleware-doctrine-orm)[ RSS](/packages/cubicmushroom-slim-middleware-doctrine-orm/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

Slim Doctrine ORM Middleware
============================

[](#slim-doctrine-orm-middleware)

Slim Middleware to make integrating Doctrine ORM easy

Setup
-----

[](#setup)

First of all, add the 'doctrine' config to the Slim application...

```
use CubicMushroom\Slim\Middleware\DoctrineORMMiddleware;

$config = [
    'doctrine' => [
        'driver' => 'pdo_mysql'
        'host' => 'localhost'
        'user' => 'dbUser'
        'password' => 'dbPassword'
        'port' => '3306'
        'dbname' => 'dbName'
    ],
];

$app = new \Slim\Slim($config);

// ...

```

The Middleware will use the config details from the app 'doctrine' config, unless you specify an alternative key in the options array, so all you then need to do is add the Middleware...

```
// ...

$options = [
   'annotationMetadataPaths' => ['path/to/entities']
];

$app->add(new DoctrineORMMiddleware($options));

// ...

```

The only required option is the `annotationMetadataPaths` key which should contain an array of paths to check for entity class annotations.

Options
-------

[](#options)

Below are lists all the supported options you can pass to the constructor.

Each of the options is defined as a class constant on the DoctrineORMMiddleware, so you could use these when passing the options array in, to protect against any future changes.

### settingsKey (optional)

[](#settingskey-optional)

Default: doctrine

The key within the app config settings that the d/b connection details can be found

### serviceName (optional)

[](#servicename-optional)

Default: @entity\_manager

The service name used for the entity manager service

### annotationMetadataPaths (required)

[](#annotationmetadatapaths-required)

An array of paths to check for entity annotations

### annotationsAutoloaders (optional)

[](#annotationsautoloaders-optional)

Default: array()

An array of class autoloaders to use when loading annotation classes.

Will be passed to Doctrine's \\Doctrine\\Common\\Annotations\\AnnotationRegistry::registerLoader() method when setting up service, to support loading of annotation classes.

### annotationsFiles (optional)

[](#annotationsfiles-optional)

Default: array()

An array of files to load when attempting to load annotation classes.

Will be passed to Doctrine's \\Doctrine\\Common\\Annotations\\AnnotationRegistry::registerFile() method when setting up service, to support loading of annotation classes.

### annotationNamespaces (optional)

[](#annotationnamespaces-optional)

Default: array()

An array of mappings of namespaces to directory paths to use when loading annotation classes.

Will be passed to Doctrine's \\Doctrine\\Common\\Annotations\\AnnotationRegistry::registerAutoloadNamespace() method when setting up service, to support loading of annotation classes.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

2

Last Release

4141d ago

### Community

Maintainers

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

---

Top Contributors

[![toby-griffiths](https://avatars.githubusercontent.com/u/4817007?v=4)](https://github.com/toby-griffiths "toby-griffiths (9 commits)")

### Embed Badge

![Health badge](/badges/cubicmushroom-slim-middleware-doctrine-orm/health.svg)

```
[![Health](https://phpackages.com/badges/cubicmushroom-slim-middleware-doctrine-orm/health.svg)](https://phpackages.com/packages/cubicmushroom-slim-middleware-doctrine-orm)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

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

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

3.8k3.8M507](/packages/pimcore-pimcore)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[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)[open-dxp/opendxp

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

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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