Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
novicell/dds_core / patches / elasticsearch_connector-d9-compatibility.patch
Size: Mime:
Index: PATCHES.txt
===================================================================
--- PATCHES.txt	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ PATCHES.txt	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
@@ -1,7 +0,0 @@
-This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
-Patches applied to this directory:
-
-(#3110970) Remove the code deprecated in Drupal 9
-Source: https://www.drupal.org/files/issues/2020-06-04/d9-compatibility-3110970-7.patch
-
-
Index: elasticsearch_connector.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- elasticsearch_connector.module	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ elasticsearch_connector.module	(date 1596002206848)
@@ -450,7 +450,7 @@
     return $client->nodes()->stats();
   }
   catch (\Exception $e) {
-    drupal_set_message($e->getMessage(), 'error');
+    \Drupal::messenger()->addError($e->getMessage());
   }
 
   return array();
@@ -498,7 +498,7 @@
     return $result;
   }
   catch (\Exception $e) {
-    drupal_set_message($e->getMessage(), 'error');
+    \Drupal::messenger()->addError($e->getMessage());
     return FALSE;
   }
 }
@@ -561,4 +561,4 @@
  */
 function elasticsearch_connector_search_api_field_type_mapping_alter(array &$mapping) {
   $mapping['object'] = 'object';
-}
\ No newline at end of file
+}
Index: modules/elasticsearch_connector_views/elasticsearch_connector_views.info.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/elasticsearch_connector_views/elasticsearch_connector_views.info.yml	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ modules/elasticsearch_connector_views/elasticsearch_connector_views.info.yml	(date 1596002909300)
@@ -1,17 +1,11 @@
-name: 
+name:
   'Elasticsearch Connector Views'
-description: 
+description:
   'Stand alone module for integration between Drupal Views and Elasticsearch indexes.'
-# core: 8.x
+core_version_requirement: ^8.8 || ^9
+version: '8.x-6.0-alpha2'
 package: Elasticsearch
 type: module
 dependencies:
  - drupal:views
  - elasticsearch_connector:elasticsearch_connector
-# version: VERSION
-
-# Information added by Drupal.org packaging script on 2019-07-31
-version: '8.x-6.0-alpha2'
-core: '8.x'
-project: 'elasticsearch_connector'
-datestamp: 1564583902
Index: src/Form/ClusterDeleteForm.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Form/ClusterDeleteForm.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ src/Form/ClusterDeleteForm.php	(date 1596002645523)
@@ -99,28 +99,26 @@
 
     // TODO: handle indices linked to the cluster being deleted.
     if (count($indices)) {
-      drupal_set_message(
+      \Drupal::messenger()->addError(
         $this->t(
           'The cluster %title cannot be deleted as it still has indices.',
           ['%title' => $this->entity->label()]
-        ),
-        'error'
+        )
       );
       return;
     }
 
     if ($this->entity->id() == $this->clusterManager->getDefaultCluster()) {
-      drupal_set_message(
+      \Drupal::messenger()->addError(
         $this->t(
           'The cluster %title cannot be deleted as it is set as the default cluster.',
           ['%title' => $this->entity->label()]
-        ),
-        'error'
+        )
       );
     }
     else {
       $this->entity->delete();
-      drupal_set_message(
+      \Drupal::messenger()->addStatus(
         $this->t(
           'The cluster %title has been deleted.',
           ['%title' => $this->entity->label()]
Index: modules/elasticsearch_connector_views/src/Plugin/views/filter/ElasticsearchViewsFulltextSearch.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/elasticsearch_connector_views/src/Plugin/views/filter/ElasticsearchViewsFulltextSearch.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ modules/elasticsearch_connector_views/src/Plugin/views/filter/ElasticsearchViewsFulltextSearch.php	(date 1596002841355)
@@ -82,7 +82,7 @@
     $cluster_id = $data['table']['base']['cluster_id'];
 
     /** @var \Drupal\elasticsearch_connector\Entity\Cluster $elasticsearchCluster */
-    $elasticsearchCluster = \Drupal::service('entity.manager')->getStorage('elasticsearch_cluster')->load($cluster_id);
+    $elasticsearchCluster = \Drupal::service('entity_type.manager')->getStorage('elasticsearch_cluster')->load($cluster_id);
     /** @var \Drupal\elasticsearch_connector\ElasticSearch\ClientManagerInterface $clientManager */
     $clientManager = \Drupal::service('elasticsearch_connector.client_manager');
     $client = $clientManager->getClientForCluster($elasticsearchCluster);
Index: src/Form/IndexForm.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Form/IndexForm.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ src/Form/IndexForm.php	(date 1596002540974)
@@ -280,7 +280,7 @@
     try {
       $response = $client->indices()->create($index_params);
       if ($client->CheckResponseAck($response)) {
-        drupal_set_message(
+        \Drupal::messenger()->addStatus(
           t(
             'The index %index having id %index_id has been successfully created.',
             array(
@@ -291,25 +291,25 @@
         );
       }
       else {
-        drupal_set_message(
+        \Drupal::messenger()->addError(
           t(
             'Fail to create the index %index having id @index_id',
             array(
               '%index' => $form_state->getValue('name'),
               '@index_id' => $form_state->getValue('index_id'),
             )
-          ), 'error'
+          )
         );
       }
 
       parent::save($form, $form_state);
 
-      drupal_set_message(t('Index %label has been added.', array('%label' => $this->entity->label())));
+      \Drupal::messenger()->addStatus(t('Index %label has been added.', ['%label' => $this->entity->label()]));
 
       $form_state->setRedirect('elasticsearch_connector.config_entity.list');
     }
     catch (\Exception $e) {
-      drupal_set_message($e->getMessage(), 'error');
+      \Drupal::messenger()->addError($e->getMessage());
     }
   }
 
Index: src/Form/IndexDeleteForm.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Form/IndexDeleteForm.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ src/Form/IndexDeleteForm.php	(date 1596002624472)
@@ -73,15 +73,15 @@
         $client->indices()->delete(['index' => $this->entity->index_id]);
       }
       $this->entity->delete();
-      drupal_set_message($this->t('The index %title has been deleted.', array('%title' => $this->entity->label())));
+      \Drupal::messenger()->addStatus($this->t('The index %title has been deleted.', ['%title' => $this->entity->label()]));
       $form_state->setRedirect('elasticsearch_connector.config_entity.list');
     }
     catch (Missing404Exception $e) {
       // The index was not found, so just remove it anyway.
-      drupal_set_message($e->getMessage(), 'error');
+      \Drupal::messenger()->addError($e->getMessage());
     }
     catch (\Exception $e) {
-      drupal_set_message($e->getMessage(), 'error');
+      \Drupal::messenger()->addError($e->getMessage());
     }
   }
 
Index: src/ElasticSearch/Parameters/Builder/SearchBuilder.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/ElasticSearch/Parameters/Builder/SearchBuilder.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ src/ElasticSearch/Parameters/Builder/SearchBuilder.php	(date 1596002323605)
@@ -217,7 +217,7 @@
     }
     catch (ElasticsearchException $e) {
       watchdog_exception('Elasticsearch Search API', $e);
-      drupal_set_message($e->getMessage(), 'error');
+      \Drupal::messenger()->addError($e->getMessage());
     }
 
     $languages = $this->query->getLanguages();
@@ -242,7 +242,7 @@
         $e,
         Html::escape($e->getMessage())
       );
-      drupal_set_message(Html::escape($e->getMessage()), 'error');
+      \Drupal::messenger()->addError(Html::escape($e->getMessage()));
     }
 
     // More Like This.
Index: elasticsearch_connector.info.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- elasticsearch_connector.info.yml	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ elasticsearch_connector.info.yml	(date 1596002901161)
@@ -1,14 +1,9 @@
-name: 
+name:
   'Elasticsearch Connector'
-description: 
+description:
   'Abstraction of making connection to the elasticsearch server. This module is API for a whole bunch of functionality connected with this module.'
-# core: 8.x
+core_version_requirement: ^8.8 || ^9
 package: Elasticsearch
 type: module
 configure: elasticsearch_connector.config_entity.list
-
-# Information added by Drupal.org packaging script on 2019-07-31
 version: '8.x-6.0-alpha2'
-core: '8.x'
-project: 'elasticsearch_connector'
-datestamp: 1564583902
Index: src/Form/ClusterForm.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Form/ClusterForm.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ src/Form/ClusterForm.php	(date 1596002460100)
@@ -251,7 +251,7 @@
     }
 
     if ($values['default'] == 0 && !empty($default) && $default == $values['cluster_id']) {
-      drupal_set_message(
+      \Drupal::messenger()->addWarning(
         t(
           'There must be a default connection. %name is still the default
           connection. Please change the default setting on the cluster you wish
@@ -259,8 +259,7 @@
           array(
             '%name' => $values['name'],
           )
-        ),
-        'warning'
+        )
       );
     }
   }
@@ -330,7 +329,7 @@
         }
       }
       catch (\Exception $e) {
-        drupal_set_message($e->getMessage(), 'error');
+        \Drupal::messenger()->addError($e->getMessage());
       }
     }
 
@@ -345,15 +344,14 @@
     if (!$form_state->isRebuilding()) {
       try {
         parent::save($form, $form_state);
-        drupal_set_message(t('Cluster %label has been updated.', array('%label' => $this->entity->label())));
+        \Drupal::messenger()->addStatus(t('Cluster %label has been updated.', ['%label' => $this->entity->label()]));
         $form_state->setRedirect('elasticsearch_connector.config_entity.list');
       }
       catch (EntityStorageException $e) {
         $form_state->setRebuild();
         watchdog_exception('elasticsearch_connector', $e);
-        drupal_set_message(
-          $this->t('The cluster could not be saved.'),
-          'error'
+        \Drupal::messenger()->addError(
+          $this->t('The cluster could not be saved.')
         );
       }
     }
Index: modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php	(revision ce452136fc8ca93dc45613e3ef986ef0e22425af)
+++ modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php	(date 1596002335902)
@@ -483,7 +483,7 @@
 
     if ($this->errors) {
       foreach ($this->errors as $msg) {
-        drupal_set_message($msg, 'error');
+        \Drupal::messenger()->addError($msg);
       }
       $view->result = array();
       $view->total_rows = 0;
diff --git tests/modules/elasticsearch_test/elasticsearch_test.info.yml.rej tests/modules/elasticsearch_test/elasticsearch_test.info.yml.rej
deleted file mode 100644
index 437b585b0b09d4d31f5dcb1d342a985ad117b8e3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001