PHPackages                             skalpa/silex-doctrine-annotations-provider - 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. skalpa/silex-doctrine-annotations-provider

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

skalpa/silex-doctrine-annotations-provider
==========================================

Doctrine annotations service provider for Pimple 3.x / Silex 2.x

v1.0.0(9y ago)0141MITPHPPHP &gt;=5.6

Since Apr 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/skalpa/silex-doctrine-annotations-provider)[ Packagist](https://packagist.org/packages/skalpa/silex-doctrine-annotations-provider)[ RSS](/packages/skalpa-silex-doctrine-annotations-provider/feed)WikiDiscussions master Synced 4w ago

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

[![Build Status](https://camo.githubusercontent.com/461c88f8183f74aab3209f406aeb7e51163b6221d028ba9b33470159d089b437/68747470733a2f2f7472617669732d63692e6f72672f736b616c70612f73696c65782d646f637472696e652d616e6e6f746174696f6e732d70726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/skalpa/silex-doctrine-annotations-provider)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f2e300ccaccff9988c40f57b33e6818c8c075c9373dbf73465f9a48978a90724/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736b616c70612f73696c65782d646f637472696e652d616e6e6f746174696f6e732d70726f76696465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/skalpa/silex-doctrine-annotations-provider/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e84a570786d892e20f3f85cd47e600331cbd416e756ac24980584b120f5ea2cc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736b616c70612f73696c65782d646f637472696e652d616e6e6f746174696f6e732d70726f76696465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/skalpa/silex-doctrine-annotations-provider/?branch=master)

Doctrine Annotations Service Provider for Silex 2.x / Pimple 3.x
================================================================

[](#doctrine-annotations-service-provider-for-silex-2x--pimple-3x)

Lets you to use the Doctrine annotations reader in your Silex/Pimple application.

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

[](#installation)

Install the service provider using composer:

```
composer require skalpa/silex-doctrine-annotations-provider
```

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

[](#registration)

```
$app->register(new \Skalpa\Silex\Doctrine\AnnotationsServiceProvider());

$fooAnnotations = $app['annotations']->getClassAnnotations(new \ReflectionClass('Foobar\FooClass'));
```

Configuration parameters
------------------------

[](#configuration-parameters)

ParameterTypeDefaultDescription`annotations.use_simple_reader``bool``false`Whether to use the Doctrine `AnnotationReader` or `SimpleAnnotationReader` class`annotations.register_autoloader``bool``true`Whether to autoload annotations using the PHP autoloader`annotations.cache``string`|`Cache``ArrayCache``Doctrine\Common\Cache\Cache` instance or name of a service that implements `Doctrine\Common\Cache\Cache``annotations.debug``bool``$app['debug']`Whether the cached reader should invalidate the cache files when the PHP class with annotations changed`annotations.ignored_names``string[]``[]`List of names that should be ignored by the annotations reader (Note: this is not supported by the `SimpleAnnotationReader`)Configuring the annotations cache
---------------------------------

[](#configuring-the-annotations-cache)

By default the cache used by the annotations reader is an `ArrayCache`, which is probably not something you'll want to use on a production server.

If you already use a Doctrine Cache service provider and want to use an already registered cache service, set `annotations.cache` to the name of the service:

```
// The DoctrineCacheServiceProvider will register a service named "cache"
$app->register(new DoctrineCacheServiceProvider());

// Cache annotations using the "cache" service
$app->register(new AnnotationsServiceProvider(), [
    'annotations.cache' => 'cache',
]);
```

Alternatively, you can override the `annotations.cache` service and provide your own cache provider:

```
$app->register(new AnnotationsServiceProvider(), [
    'annotations.cache' => function () {
        $cache = new \Doctrine\Common\Cache\PhpFileCache(__DIR__.'/cache);
        $cache->setNamespace('annotations');

        return $cache;
    },
]);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

3367d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4943191?v=4)[Pascal Luna](/maintainers/skalpa)[@skalpa](https://github.com/skalpa)

---

Top Contributors

[![skalpa](https://avatars.githubusercontent.com/u/4943191?v=4)](https://github.com/skalpa "skalpa (6 commits)")

---

Tags

doctrineannotationsprovidersilexpimple

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skalpa-silex-doctrine-annotations-provider/health.svg)

```
[![Health](https://phpackages.com/badges/skalpa-silex-doctrine-annotations-provider/health.svg)](https://phpackages.com/packages/skalpa-silex-doctrine-annotations-provider)
```

###  Alternatives

[dflydev/doctrine-orm-service-provider

Doctrine ORM Service Provider

2121.8M35](/packages/dflydev-doctrine-orm-service-provider)[nettrine/annotations

Doctrine Annotations for Nette Framework

203.1M8](/packages/nettrine-annotations)[kdyby/annotations

Doctrine Annotations integration into Nette Framework

101.3M18](/packages/kdyby-annotations)

PHPackages © 2026

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