Download the PHP package knplabs/rad-auto-registration without Composer
On this page you can find all versions of the php package knplabs/rad-auto-registration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download knplabs/rad-auto-registration
More information about knplabs/rad-auto-registration
Files in knplabs/rad-auto-registration
Package rad-auto-registration
Short Description Auto register some common services
License MIT
Informations about the package rad-auto-registration
DEPRECATED
Unfortunately we decided to not maintain this project anymore (see why). If you want to mark another package as a replacement for this one please send an email to [email protected].
Rapid Application Development : Auto-Registration
Auto register some common services
Official maintainers:
Installation
Use
Doctrine repositories auto-registration
Just activate doctrine (or doctrine_mongodb ou doctrine_couchdb depending on your needs) into your configuration.
Now all repositories are auto-registred.
| Entity | Repository |
|---|---|
| MyProjectBundle\Entity\User | my_project_bundle.entity.user_repository |
| TheOtherBundle\Entity\Model\Address | the_other_bundle.model.user.address_repository |
| MyProjectBunde\Document\User | my_project_bundle.document.user_repository |
Requirements
Your doctrine entity (or documents) should be stored under Entity, Document or Model sub-namespace.
Constraint validators
Just activate constraint_validator into your configuration.
Now all custom constaint validators are auto-registered.
Requirements
Your constraint validators should be stored under Validation or Validator sub-namespace.
Form extensions
Just activate form_type_extension into your configuration.
Now all form type extensions are auto-registred.
Requirements
Your form type extensions should be stored under Form sub-namespace.
Security voters
Just activate security_voter into your configuration.
Now all the voters are auto-registered.
Requirements
Your security voters should be stored under Security sub-namespace.
Twig extensions
Just activate twig_extension into your configuration.
Now all Twig extensions are auto-registered.
Requirements
Your Twig extensions should be stored under Twig or Templating sub-namespace.
Public/Private 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:
Restrictions
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
You can apply auto-registration on only certains bundle. You just have to add a bundles configuration:
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.
All versions of rad-auto-registration with dependencies
doctrine/dbal Version ~2.2
doctrine/inflector Version ~1.0
psr/log Version ~1.0
symfony/config Version ~2.8||~3.0
symfony/dependency-injection Version ~2.8||~3.0
symfony/framework-bundle Version ~2.8||~3.0
symfony/http-kernel Version ~2.8||~3.0
symfony/security-bundle Version ~2.8||~3.0
symfony/twig-bundle Version ~2.8||~3.0
twig/twig Version ~1
