DependencyInjection/Compiler/ThemeCompilerPass.php
public function process(ContainerBuilder $container)
    {
        $twigFilesystemLoaderDefinition = $container->findDefinition('twig.loader.filesystem');
        $twigFilesystemLoaderDefinition->setClass(FilesystemLoader::class);

        if (false === $container->has('templating')) {
            $twigFilesystemLoaderDefinition->replaceArgument(0,
                $container->getDefinition('liip_theme.templating_locator'));
            $twigFilesystemLoaderDefinition->replaceArgument(1,
                $container->getDefinition('templating.filename_parser'));
            $twigFilesystemLoaderDefinition->setArgument(2, new Reference('kernel'));
            $twigFilesystemLoaderDefinition->setArgument(3, new Reference(SettingsRouter::class));
        }

        $twigFilesystemLoaderDefinition->addMethodCall('setActiveTheme', [new Reference('liip_theme.active_theme')]);
    }
public function process(ContainerBuilder $container)
    {
        $twigFilesystemLoaderDefinition = $container->findDefinition('twig.loader.filesystem');
        $twigFilesystemLoaderDefinition->setClass(FilesystemLoader::class);

        if (false === $container->has('templating')) {
            $twigFilesystemLoaderDefinition->replaceArgument(0,
                $container->getDefinition('liip_theme.templating_locator'));
            $twigFilesystemLoaderDefinition->replaceArgument(1,
                $container->getDefinition('templating.filename_parser'));
            $twigFilesystemLoaderDefinition->setArgument(2, new Reference('kernel'));
            $twigFilesystemLoaderDefinition->setArgument(3, new Reference(SettingsRouter::class));
        }

        $twigFilesystemLoaderDefinition->addMethodCall('setActiveTheme', [new Reference('liip_theme.active_theme')]);
    }
You can modify the container here before it is dumped to PHP code.

@param ContainerBuilder $container