PHPackages                             knplabs/rad-auto-registration - 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. knplabs/rad-auto-registration

AbandonedArchivedLibrary

knplabs/rad-auto-registration
=============================

Auto register some common services

v2.2.3(8y ago)838.8k2[2 PRs](https://github.com/KnpLabs/rad-auto-registration/pulls)MITPHPPHP ~7.0

Since Feb 4Pushed 3y ago24 watchersCompare

[ Source](https://github.com/KnpLabs/rad-auto-registration)[ Packagist](https://packagist.org/packages/knplabs/rad-auto-registration)[ RSS](/packages/knplabs-rad-auto-registration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (14)Versions (19)Used By (0)

DEPRECATED
==========

[](#deprecated)

Unfortunately we decided to not maintain this project anymore ([see why](https://knplabs.com/en/blog/news-for-our-foss-projects-maintenance)). If you want to mark another package as a replacement for this one please send an email to .

Rapid Application Development : Auto-Registration
=================================================

[](#rapid-application-development--auto-registration)

Auto register some common services

[![Build Status](https://camo.githubusercontent.com/48395be599c76d5c43926e0e48046113ab0450631fc23bbe4396b9b46dbe5d77/68747470733a2f2f7472617669732d63692e6f72672f4b6e704c6162732f7261642d6175746f2d726567697374726174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/KnpLabs/rad-auto-registration)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f8176cdbf9399d1b1f4573e313e126b44725429795b523999671953ae8c2a55c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4b6e704c6162732f7261642d6175746f2d726567697374726174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/KnpLabs/rad-auto-registration/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/27a047ae4f027526b503170c62fee77b926b074aaa3ac10a82d3b8c369aa19b2/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d6175746f2d726567697374726174696f6e2f762f737461626c65)](https://packagist.org/packages/knplabs/rad-auto-registration) [![Total Downloads](https://camo.githubusercontent.com/a877b455d461c1abbe6f4bb0e9de4d9b1ec644c6e00b14c17816e5d9bdf4f82d/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d6175746f2d726567697374726174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/knplabs/rad-auto-registration) [![Latest Unstable Version](https://camo.githubusercontent.com/0dfc31662682cc74fba4e5a13950f055cf6673e8b9e4ece0b8bff9bb75b813b5/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d6175746f2d726567697374726174696f6e2f762f756e737461626c65)](https://packagist.org/packages/knplabs/rad-auto-registration) [![License](https://camo.githubusercontent.com/a0f45af69a7d150963fa94f42b15aed25136b92471c4a0dace753edf861ff57f/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d6175746f2d726567697374726174696f6e2f6c6963656e7365)](https://packagist.org/packages/knplabs/rad-auto-registration)

Official maintainers:
=====================

[](#official-maintainers)

- [@Einenlum](https://github.com/Einenlum)

Installation
============

[](#installation)

```
composer require knplabs/rad-auto-registration:~2.0
```

```
class AppKernel
{
    function registerBundles()
    {
        $bundles = array(
            //...
            new Knp\Rad\AutoRegistration\Bundle\AutoRegistrationBundle($this), // !! Do not forget to inject the kernel !!
            //...
        );

        //...

        return $bundles;
    }
}
```

Use
===

[](#use)

Doctrine repositories auto-registration
---------------------------------------

[](#doctrine-repositories-auto-registration)

Just activate `doctrine` (or `doctrine_mongodb` ou `doctrine_couchdb` depending on your needs) into your configuration.

```
knp_rad_auto_registration:
    enable:
        doctrine: ~
        doctrine_mongodb: ~
        doctrine_couchdb: ~
```

Now all repositories are auto-registred.

EntityRepositoryMyProjectBundle\\Entity\\Usermy\_project\_bundle.entity.user\_repositoryTheOtherBundle\\Entity\\Model\\Addressthe\_other\_bundle.model.user.address\_repositoryMyProjectBunde\\Document\\Usermy\_project\_bundle.document.user\_repository### Requirements

[](#requirements)

Your doctrine entity (or documents) should be stored under `Entity`, `Document` or `Model` sub-namespace.

Constraint validators
---------------------

[](#constraint-validators)

Just activate `constraint_validator` into your configuration.

```
knp_rad_auto_registration:
    enable:
        constraint_validator: ~
```

Now all custom constaint validators are auto-registered.

### Requirements

[](#requirements-1)

Your constraint validators should be stored under `Validation` or `Validator` sub-namespace.

Form extensions
---------------

[](#form-extensions)

Just activate `form_type_extension` into your configuration.

```
knp_rad_auto_registration:
    enable:
        form_type_extension: ~
```

Now all form type extensions are auto-registred.

### Requirements

[](#requirements-2)

Your form type extensions should be stored under `Form` sub-namespace.

Security voters
---------------

[](#security-voters)

Just activate `security_voter` into your configuration.

```
knp_rad_auto_registration:
    enable:
        security_voter: ~
```

Now all the voters are auto-registered.

### Requirements

[](#requirements-3)

Your security voters should be stored under `Security` sub-namespace.

Twig extensions
---------------

[](#twig-extensions)

Just activate `twig_extension` into your configuration.

```
knp_rad_auto_registration:
    enable:
        twig_extension: ~
```

Now all Twig extensions are auto-registered.

### Requirements

[](#requirements-4)

Your Twig extensions should be stored under `Twig` or `Templating` sub-namespace.

Public/Private services
-----------------------

[](#publicprivate-services)

By default, all autoregistered services are marked as `private` (`public: false`). You can overide this behavior by setting the `public` parameter to `true`.

Example:

```
knp_rad_auto_registration:
    enable:
        doctrine:
            public: true
        doctrine_mongodb:
            public: false
        doctrine_couchdb:
            public: false
```

Restrictions
============

[](#restrictions)

Autoloading
-----------

[](#autoloading)

- Only services without constructor or without required parameters into the constructor will be auto-registred.
- If a service already exists, it will not be erased.

Bundle
------

[](#bundle)

You can apply auto-registration on only certains bundle. You just have to add a `bundles` configuration:

```
knp_rad_auto_registration:
    enable:
        # ...
    bundles: [ App, ProductBundle ]
```

WARNING
=======

[](#warning)

All auto-registered services are set as `private`, so it's impossible to get them by using `$container->get('service_name')`. If needed, create the service definition by yourself.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 72.9% 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 ~64 days

Recently: every ~133 days

Total

16

Last Release

3152d ago

Major Versions

v1.3.3 → v2.0.02016-03-03

PHP version history (2 changes)v2.0.0PHP &gt;=5.4

v2.2.3PHP ~7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/202732?v=4)[KNP Labs](/maintainers/KnpLabs)[@KnpLabs](https://github.com/KnpLabs)

---

Top Contributors

[![PedroTroller](https://avatars.githubusercontent.com/u/1766827?v=4)](https://github.com/PedroTroller "PedroTroller (35 commits)")[![akerouanton](https://avatars.githubusercontent.com/u/557933?v=4)](https://github.com/akerouanton "akerouanton (3 commits)")[![polc](https://avatars.githubusercontent.com/u/3513348?v=4)](https://github.com/polc "polc (3 commits)")[![wysow](https://avatars.githubusercontent.com/u/632747?v=4)](https://github.com/wysow "wysow (2 commits)")[![Djeg](https://avatars.githubusercontent.com/u/1638230?v=4)](https://github.com/Djeg "Djeg (2 commits)")[![AntoineLelaisant](https://avatars.githubusercontent.com/u/4592355?v=4)](https://github.com/AntoineLelaisant "AntoineLelaisant (1 commits)")[![alexpozzi](https://avatars.githubusercontent.com/u/8307861?v=4)](https://github.com/alexpozzi "alexpozzi (1 commits)")[![akovalyov](https://avatars.githubusercontent.com/u/2339101?v=4)](https://github.com/akovalyov "akovalyov (1 commits)")

### Embed Badge

![Health badge](/badges/knplabs-rad-auto-registration/health.svg)

```
[![Health](https://phpackages.com/badges/knplabs-rad-auto-registration/health.svg)](https://phpackages.com/packages/knplabs-rad-auto-registration)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M646](/packages/sylius-sylius)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M309](/packages/easycorp-easyadmin-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

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