Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

\Symfony\Component\DependencyInjection\ContainerAwareTrait And \Symfony\Component\DependencyInjection\ContainerAwareInterface are being deprecated in Symfony 6.4 and removed in 7.0.

Both \Drupal\Core\Update\UpdateHookRegistryFactory and Drupal\Core\Update\UpdateRegistryFactory are currently ContainerAware.

We deprecated both of them and now inject the correct services and parameters as an argument in both \Drupal\Core\Update\UpdateHookRegistry::__construct and Drupal\Core\Entity\UpdateRegistry::__construct.

\Drupal\Core\Update\UpdateHookRegistry::__construct before:

  /**
   * Constructs a new UpdateRegistry.
   *
   * @param string[] $enabled_modules
   *   A list of enabled modules.
   * @param \Drupal\Core\KeyValueStore\KeyValueStoreInterface $key_value
   *   The key value store.
   */
  public function __construct(array $enabled_modules, KeyValueStoreInterface $key_value) {

\Drupal\Core\Update\UpdateHookRegistry::__construct after:

  /**
   * Constructs a new UpdateHookRegistry.
   *
   * @param array $module_list
   *   An associative array whose keys are the names of installed modules.
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   *   The key value factory.
   */
  public function __construct(array $module_list, KeyValueFactoryInterface $key_value_factory) {

\Drupal\Core\Update\UpdateRegistry::__construct before:

  /**
   * Constructs a new UpdateRegistry.
   *
   * @param string $root
   *   The app root.
   * @param string $site_path
   *   The site path.
   * @param array $module_list
   *   An associative array whose keys are the names of installed modules.
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   *   The key value store.
   * @param bool|null $include_tests
   *   (optional) A flag whether to include tests in the scanning of extensions.
   */
  public function __construct($root, $site_path, array $enabled_extensions, KeyValueStoreInterface $key_value, $include_tests = NULL) {

\Drupal\Core\Update\UpdateRegistry::__construct after:

  /**
   * Constructs a new UpdateRegistry.
   *
   * @param string $root
   *   The app root.
   * @param string $site_path
   *   The site path.
   * @param array $module_list
   *   An associative array whose keys are the names of installed modules.
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   *   The key value factory.
   * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
   *   The theme handler.
   */
  public function __construct($root, $site_path, $module_list, KeyValueFactoryInterface $key_value_factory, ThemeHandlerInterface $theme_handler) {
Impacts: 
Module developers