src/DependencyInjection/CompilerPass/ServiceAliasCompilerPass.php
public function process(ContainerBuilder $container)
    {
        $serviceIds = array_keys($container->findTaggedServiceIds('cache.provider'));
        foreach ($serviceIds as $serviceId) {
            $instance = $container->get($serviceId);
            $class = get_class($instance);

            $container->setAlias($class, $serviceId);
        }
    }
public function process(ContainerBuilder $container)
    {
        $serviceIds = array_keys($container->findTaggedServiceIds('cache.provider'));
        foreach ($serviceIds as $serviceId) {
            $instance = $container->get($serviceId);
            $class = get_class($instance);

            $container->setAlias($class, $serviceId);
        }
    }
You can modify the container here before it is dumped to PHP code.

@param ContainerBuilder $container