Skip to content

Update[Hook]RegistryFactory are deprecated, Update[Hook]Registry services constructor arguments are changed #862

@github-actions

Description

@github-actions

https://www.drupal.org/node/3423659

Introduced in branch/version: 10.3.x / 10.3.0

\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) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy