private function injectRewritersIntoRegistry(ContainerBuilder $container, array $references)
    {
        $registryDefinition = $container
            ->getDefinition(ServiceNames::BUNDLE_CONFIGURATION_SERVICE_DEFINITION_REWRITER_REGISTRY);

        $arguments = $registryDefinition->getArguments();

        $arguments[0] = $references;

        $registryDefinition->setArguments($arguments);
    }