Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Service manager provides an UI to see list of available services in Drupal 8. It also provides list of alternative definition available for a particular services by checking the interface implemented by a service.
Why Service Manager?
- No way to see all the services in one place
- No way to know the available alternative implementation for a service
- No easy way to switch the service class without updating sites/default/services.yml
- Every override need to updated in sites/default/services.yml
How service manager solves the above problem
- UI to see all the services available
- Shows list of alternative implementations (not accurate as try to find classes implement the same interface)
- Not in place - But can add a option to switch class. This can be done
- Not in place - If we can import the services using yml file as mentioned in Symfony documention, we can generate the service file dynamically and all we need in sites/default/services.yml is just this:
# sites/default/services.yml imports: - { resource: "@Drupal/serivice_manager/Resources/config/services.yml" }
Obviously, we can add plugin/hook to modules to provide mandatory overrides.
Project information
- Created by vijaycs85 on , updated