diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php index 008c6f5cd4af1e826dc5c84567a6c1df344053fa..63214828bfe39f443836ee8ea94e97ca901366d8 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Container.php +++ b/core/lib/Drupal/Component/DependencyInjection/Container.php @@ -3,7 +3,6 @@ namespace Drupal\Component\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\ResettableContainerInterface; use Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; @@ -42,9 +41,12 @@ * - The function getServiceIds() was added as it has a use-case in core and * contrib. * + * @todo Implement Symfony\Contracts\Service\ResetInterface once Symfony 4 + * is being used. See https://www.drupal.org/project/drupal/issues/3032605 + * * @ingroup container */ -class Container implements ContainerInterface, ResettableContainerInterface { +class Container implements ContainerInterface { /** * The parameters of the container. @@ -187,7 +189,12 @@ public function get($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_IN } /** - * {@inheritdoc} + * Resets shared services from the container. + * + * The container is not intended to be used again after being reset in a + * normal workflow. This method is meant as a way to release references for + * ref-counting. A subsequent call to ContainerInterface::get() will recreate + * a new instance of the shared service. */ public function reset() { if (!empty($this->scopedServices)) {