diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 6bd6cffb3135eac18b87d5ba15ae4ca87525209f..e45f4e98d749ce0f6ca1a9518316df8140f62c56 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -549,20 +549,6 @@ public function getContainer() { return $this->container; } - /** - * {@inheritdoc} - */ - public function setContainer(ContainerInterface $container = NULL): void { - if (isset($this->container)) { - throw new \Exception('The container should not override an existing container.'); - } - if ($this->booted) { - throw new \Exception('The container cannot be set after a booted kernel.'); - } - - $this->container = $container; - } - /** * {@inheritdoc} */ diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php index f42e8eec6fb3fc88b11d9e7269737d0e56dd15b6..dd7864cd7b45213757cefeec9066c9b8f3d6a4f0 100644 --- a/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -2,7 +2,6 @@ namespace Drupal\Core; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; @@ -12,7 +11,7 @@ * This interface extends Symfony's KernelInterface and adds methods for * responding to modules being enabled or disabled during its lifetime. */ -interface DrupalKernelInterface extends HttpKernelInterface, ContainerAwareInterface { +interface DrupalKernelInterface extends HttpKernelInterface { /** * Event fired when the service container finished initializing in subrequest. diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index 42dae7ffe324b69f5ff1573151bb8b423ad4cbe5..aa04f5a6535c356d18631dc8c62adc2bbec5d2c1 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -456,14 +456,6 @@ parameters: count: 1 path: lib/Drupal/Core/DrupalKernel.php - - - message: """ - #^Interface Drupal\\\\Core\\\\DrupalKernelInterface extends deprecated interface Symfony\\\\Component\\\\DependencyInjection\\\\ContainerAwareInterface\\: - since Symfony 6\\.4, use dependency injection instead$# - """ - count: 1 - path: lib/Drupal/Core/DrupalKernelInterface.php - - message: "#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#" count: 1