Skip to content
Snippets Groups Projects
Commit 78ec28a9 authored by catch's avatar catch
Browse files

Issue #3415938 by longwave, Spokje, taraskorpach: Remove ContainerAwareTrait...

Issue #3415938 by longwave, Spokje, taraskorpach: Remove ContainerAwareTrait from CacheFactory and ChainedFastBackendFactory
parent 79e8ae5d
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,9 @@
* Defines the cache backend factory.
*/
use Drupal\Core\Site\Settings;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Psr\Container\ContainerInterface;
class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface {
use ContainerAwareTrait;
class CacheFactory implements CacheFactoryInterface {
/**
* The site settings.
......@@ -44,6 +41,18 @@ class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface {
*/
protected $memoryDefaultBinBackends;
/**
* The service container.
*/
protected ContainerInterface $container;
/**
* Sets the service container.
*/
public function setContainer(ContainerInterface $container): void {
$this->container = $container;
}
/**
* Constructs CacheFactory object.
*
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Installer\InstallerKernel;
use Drupal\Core\Site\Settings;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Psr\Container\ContainerInterface;
/**
* Defines the chained fast cache backend factory.
......@@ -13,8 +13,6 @@
*/
class ChainedFastBackendFactory implements CacheFactoryInterface {
use ContainerAwareTrait;
/**
* The service name of the consistent backend factory.
*
......@@ -29,6 +27,18 @@ class ChainedFastBackendFactory implements CacheFactoryInterface {
*/
protected $fastServiceName;
/**
* The service container.
*/
protected ContainerInterface $container;
/**
* Sets the service container.
*/
public function setContainer(ContainerInterface $container): void {
$this->container = $container;
}
/**
* Constructs ChainedFastBackendFactory object.
*
......
......@@ -237,30 +237,6 @@ parameters:
count: 1
path: lib/Drupal/Core/Block/BlockManager.php
-
message: """
#^Class Drupal\\\\Core\\\\Cache\\\\CacheFactory implements deprecated interface Symfony\\\\Component\\\\DependencyInjection\\\\ContainerAwareInterface\\:
since Symfony 6\\.4, use dependency injection instead$#
"""
count: 1
path: lib/Drupal/Core/Cache/CacheFactory.php
-
message: """
#^Usage of deprecated trait Symfony\\\\Component\\\\DependencyInjection\\\\ContainerAwareTrait in class Drupal\\\\Core\\\\Cache\\\\CacheFactory\\:
since Symfony 6\\.4, use dependency injection instead$#
"""
count: 1
path: lib/Drupal/Core/Cache/CacheFactory.php
-
message: """
#^Usage of deprecated trait Symfony\\\\Component\\\\DependencyInjection\\\\ContainerAwareTrait in class Drupal\\\\Core\\\\Cache\\\\ChainedFastBackendFactory\\:
since Symfony 6\\.4, use dependency injection instead$#
"""
count: 1
path: lib/Drupal/Core/Cache/ChainedFastBackendFactory.php
-
message: "#^Constructor of class Drupal\\\\Core\\\\Cache\\\\NullBackend has an unused parameter \\$bin\\.$#"
count: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment