https://github.com/deprecated-packages/autoserviceregistration
[DEPRECATED] Use Symfony 3.3 instead
https://github.com/deprecated-packages/autoserviceregistration
dependency-injection symfony symplify
Last synced: about 1 month ago
JSON representation
[DEPRECATED] Use Symfony 3.3 instead
- Host: GitHub
- URL: https://github.com/deprecated-packages/autoserviceregistration
- Owner: deprecated-packages
- License: mit
- Created: 2016-10-18T14:40:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-28T18:56:38.000Z (about 9 years ago)
- Last Synced: 2025-04-05T15:46:01.072Z (about 1 year ago)
- Topics: dependency-injection, symfony, symplify
- Language: PHP
- Homepage: https://github.com/symfony/symfony/pull/21289
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto Register Services By Class Name Suffix - Deprecated, in core of Symfony 3.3+
- https://github.com/symfony/symfony/pull/21289
---
Register every Controller, Repository or Command in your app.
No need to do that manually in `config.yml` files. Very useful in large projects to keep configs clean.
[](https://travis-ci.org/Symplify/AutoServiceRegistration)
[](https://scrutinizer-ci.com/g/Symplify/AutoServiceRegistration)
[](https://packagist.org/packages/symplify/auto-service-registration)
## Install
```bash
composer require symplify/auto-service-registration
```
### Registration in Symfony
Add bundle to `AppKernel.php`:
```php
class AppKernel extends Kernel
{
public function registerBundles(): array
{
$bundles = [
new Symplify\AutoServiceRegistration\Adapter\Symfony\SymplifyAutoServiceRegistrationBundle(),
// ...
];
}
}
```
## Usage in Symfony
```yml
# app/config/config.yml with default value
symplify_auto_service_registration:
directories_to_scan: # where to scan classes
- %kernel.root_dir%
- %kernel.root_dir%/../src
class_suffixes_to_seek: # what class name suffixes to look for
- Controller
```
That's all :)
## Contributing
Send [issue](https://github.com/Symplify/Symplify/issues) or [pull-request](https://github.com/Symplify/Symplify/pulls) to main repository.