Issue #3029197 by catch, Gábor Hojtsy, alexpott, mikelutz: [symfony 5] Class implements "Symfony\Component\DependencyInjection\ResettableContainerInterface" that is deprecated since Symfony 4.2, use "Symfony\Contracts\Service\ResetInterface" instead
parent
84a06d6b6e
commit
1036f4cca0
|
@ -3,7 +3,6 @@
|
||||||
namespace Drupal\Component\DependencyInjection;
|
namespace Drupal\Component\DependencyInjection;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
|
|
||||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||||
|
@ -42,9 +41,12 @@ use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceExce
|
||||||
* - The function getServiceIds() was added as it has a use-case in core and
|
* - The function getServiceIds() was added as it has a use-case in core and
|
||||||
* contrib.
|
* contrib.
|
||||||
*
|
*
|
||||||
|
* @todo Implement Symfony\Contracts\Service\ResetInterface once Symfony 4
|
||||||
|
* is being used. See https://www.drupal.org/project/drupal/issues/3032605
|
||||||
|
*
|
||||||
* @ingroup container
|
* @ingroup container
|
||||||
*/
|
*/
|
||||||
class Container implements ContainerInterface, ResettableContainerInterface {
|
class Container implements ContainerInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The parameters of the container.
|
* The parameters of the container.
|
||||||
|
@ -187,7 +189,12 @@ class Container implements ContainerInterface, ResettableContainerInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@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() {
|
public function reset() {
|
||||||
if (!empty($this->scopedServices)) {
|
if (!empty($this->scopedServices)) {
|
||||||
|
|
Loading…
Reference in New Issue