ContainerBuilder::set

public function ContainerBuilder::set

public ContainerBuilder::set($id, $service, $scope = self::SCOPE_CONTAINER)

Overrides Symfony\Component\DependencyInjection\ContainerBuilder::set().

Drupal's container builder can be used at runtime after compilation, so we override Symfony's ContainerBuilder's restriction on setting services in a frozen builder.

@todo Restrict this to synthetic services only. Ideally, the upstream ContainerBuilder class should be fixed to allow setting synthetic services in a frozen builder.