From 4ce9be5382595469fa17e289db4516b29842d491 Mon Sep 17 00:00:00 2001
From: Omar Alahmed <ofma99@gmail.com>
Date: Tue, 6 Oct 2020 18:10:15 +0300
Subject: [PATCH] Issue #3168295: ArgumentCountError: Too few arguments to
 function Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::__construct()

---
 .../views/filter/ShsChosenTaxonomyIndexTidDepth.php    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php b/modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php
index e2f649c..a71adf2 100644
--- a/modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php
+++ b/modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php
@@ -5,6 +5,8 @@ namespace Drupal\shs_chosen\Plugin\views\filter;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Database\Query\Condition;
+use Drupal\taxonomy\TermStorageInterface;
+use Drupal\taxonomy\VocabularyStorageInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 /**
  * Filter handler for taxonomy terms with depth.
@@ -33,11 +35,13 @@ class ShsChosenTaxonomyIndexTidDepth extends ShsChosenTaxonomyIndexTid {
    *   The Plugin id.
    * @param mixed $plugin_definition
    *   The Plugin definition.
+   * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage
+   * @param \Drupal\taxonomy\TermStorageInterface $term_storage
    * @param \Drupal\Core\Database\Connection $database
    *   A JSON response containing autocomplete suggestions.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage, Connection $database) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $vocabulary_storage, $term_storage);
     $this->database = $database;
   }
   /**
@@ -48,6 +52,8 @@ class ShsChosenTaxonomyIndexTidDepth extends ShsChosenTaxonomyIndexTid {
       $configuration,
       $plugin_id,
       $plugin_definition,
+      $container->get('entity_type.manager')->getStorage('taxonomy_vocabulary'),
+      $container->get('entity_type.manager')->getStorage('taxonomy_term'),
       $container->get('database')
     );
   }
-- 
2.17.1

