Verified Commit bb5d24ea authored by godotislate's avatar godotislate
Browse files

task: #3620747 Remove deprecated method arguments tagged for 12.0.0

By: longwave
By: smustgrave
By: godotislate
parent 0c132396
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -30,12 +30,8 @@ public function __construct(
    protected LibrariesDirectoryFileFinder $librariesDirectoryFileFinder,
    protected ExtensionPathResolver $extensionPathResolver,
    protected ComponentPluginManager $componentPluginManager,
    protected ?YamlCacheCollector $yamlCacheCollector = NULL,
    protected YamlCacheCollector $yamlCacheCollector,
  ) {
    if (!isset($yamlCacheCollector)) {
      $this->yamlCacheCollector = \Drupal::service('libraries.parsing_cache');
      @trigger_error('Calling ' . __METHOD__ . '() without the $yamlCacheCollector argument is deprecated in drupal:11.4.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3593451', E_USER_DEPRECATED);
    }
  }

  /**
+1 −5
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public function __construct(
    protected LoggerInterface $logger,
    #[AutowireIterator(tag: 'module_install.uninstall_validator')]
    protected \Traversable $uninstallValidators,
    protected ?ModuleWeight $moduleWeight,
    protected ModuleWeight $moduleWeight,
  ) {
    $this->root = $root;
    $this->moduleHandler = $module_handler;
@@ -88,10 +88,6 @@ public function __construct(
    $this->connection = $connection;
    $this->updateRegistry = $update_registry;

    if (!$this->moduleWeight instanceof ModuleWeight) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $moduleWeight argument is deprecated in drupal:11.5.0 and the argument will be required in drupal:12.0.0. See https://www.drupal.org/node/3595653', E_USER_DEPRECATED);
      $this->moduleWeight = \Drupal::service(ModuleWeight::class);
    }
  }

  /**
+1 −11
Original line number Diff line number Diff line
@@ -48,11 +48,6 @@ class LocalActionManager extends DefaultPluginManager implements LocalActionMana
    'class' => 'Drupal\Core\Menu\LocalActionDefault',
  ];

  /**
   * The YAML cache collector.
   */
  protected CacheCollectorInterface $yamlCacheCollector;

  /**
   * The plugin instances.
   *
@@ -70,13 +65,8 @@ public function __construct(
    protected LanguageManagerInterface $languageManager,
    protected AccessManagerInterface $accessManager,
    protected AccountInterface $account,
    ?CacheCollectorInterface $yaml_cache_collector = NULL,
    protected CacheCollectorInterface $yamlCacheCollector,
  ) {
    if (!isset($yaml_cache_collector)) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $yamlCacheCollector argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3593485', E_USER_DEPRECATED);
      $yaml_cache_collector = \Drupal::service('local_action.yaml_cache_collector');
    }
    $this->yamlCacheCollector = $yaml_cache_collector;
    // Skip calling the parent constructor, since that assumes annotation-based
    // discovery.
    $this->moduleHandler = $module_handler;
+1 −11
Original line number Diff line number Diff line
@@ -64,11 +64,6 @@ class LocalTaskManager extends DefaultPluginManager implements LocalTaskManagerI
   */
  protected $taskData;

  /**
   * The YAML cache collector.
   */
  protected CacheCollectorInterface $yamlCacheCollector;

  /**
   * Flag that indicates if local tasks are currently being loaded.
   */
@@ -84,13 +79,8 @@ public function __construct(
    LanguageManagerInterface $language_manager,
    protected AccessManagerInterface $accessManager,
    protected AccountInterface $account,
    ?CacheCollectorInterface $yaml_cache_collector = NULL,
    protected CacheCollectorInterface $yamlCacheCollector,
  ) {
    if (!isset($yaml_cache_collector)) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $yamlCacheCollector argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3593485', E_USER_DEPRECATED);
      $yaml_cache_collector = \Drupal::service('local_task.yaml_cache_collector');
    }
    $this->yamlCacheCollector = $yaml_cache_collector;
    $this->moduleHandler = $module_handler;
    $this->alterInfo('local_tasks');
    $this->setCacheBackend($cache, 'local_task_plugins:' . $language_manager->getCurrentLanguage()->getId(), ['local_task']);
+1 −11
Original line number Diff line number Diff line
@@ -34,22 +34,12 @@ class MenuLinkManager implements MenuLinkManagerInterface {
   */
  protected $factory;

  /**
   * The YAML cache collector.
   */
  protected CacheCollectorInterface $yamlCacheCollector;

  public function __construct(
    protected MenuTreeStorageInterface $treeStorage,
    protected StaticMenuLinkOverridesInterface $overrides,
    protected ModuleHandlerInterface $moduleHandler,
    ?CacheCollectorInterface $yaml_cache_collector = NULL,
    protected CacheCollectorInterface $yamlCacheCollector,
  ) {
    if (!isset($yaml_cache_collector)) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $yamlCacheCollector argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3593485', E_USER_DEPRECATED);
      $yaml_cache_collector = \Drupal::service('local_task.yaml_cache_collector');
    }
    $this->yamlCacheCollector = $yaml_cache_collector;
  }

  /**
Loading