major
minor
major
minor
A service (ManagedClass) can have either a declared dependency (tl:ServiceDependencies) or a configured dependency (tl:ServiceConfiguration) on another service. In both cases, all dependencies of a service always start before the service that declares the dependency.
Improvement
A weaker form of dependency is the optional dependency. Here, a service can use another service provided that it is available or as long as it remains available. The optional dependency does not imply any start/stop dependency between the services.
Application
Service A, which wants to use Service B, declares the interface `ServiceDependency<B> ` and registers the dependency in its `StartUp` method on Service B’s module (`B.Module.INSTANCE.addServiceDependency(this)`).
Test
See #26529: The application resources receive the cluster manager as an optional dependency.