How to instantiate a service inside ServiceProvider? I need to instantiate a service inside ServiceProvider.
At that point the container is not built.

Any ideas or useful links?

&lt;?php

namespace Drupal\my_module;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;

class MyModuleServiceProvider extends ServiceProviderBase {

  public function register(ContainerBuilder $container) {
    parent::register($container);

    // How to get a service here?
    // Currently container is not built :)

  }

}
You can't get services at this point.
This interface ServiceProviderInterface is only for registering services, not for retrieving
For retrieving service with future altering try to use ServiceModifierInterface