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 1mo ago

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 27% 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

4089d 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

[sulu/sulu

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

1.3k1.3M152](/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.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[open-dxp/opendxp

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

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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