From 682db98348f28d2f103b65d9a87f16e6f5e7e3a4 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Mon, 29 Jan 2024 08:06:54 -0800 Subject: [PATCH 1/3] Updated QuantClient for php 8.2 deprecation. --- modules/quant_api/src/Client/QuantClient.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/quant_api/src/Client/QuantClient.php b/modules/quant_api/src/Client/QuantClient.php index b5469486..1f03c168 100644 --- a/modules/quant_api/src/Client/QuantClient.php +++ b/modules/quant_api/src/Client/QuantClient.php @@ -31,6 +31,13 @@ class QuantClient implements QuantClientInterface { */ protected $logger; + /** + * The Guzzle client. + * + * @var \GuzzleHttp\Client + */ + protected $client; + /** * The client account. * From f113efe0c7f4b7fb2736b8d5c78b7331e6101791 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Mon, 29 Jan 2024 22:50:09 -0800 Subject: [PATCH 2/3] Added client property for php 8.2 deprecation. --- modules/quant_api/src/Form/SettingsForm.php | 7 +++++++ modules/quant_search/src/Controller/Search.php | 7 +++++++ modules/quant_search/src/Form/SearchEntitiesForm.php | 7 +++++++ modules/quant_search/src/Form/SearchIndexForm.php | 7 +++++++ modules/quant_search/src/Form/SearchPagesForm.php | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/modules/quant_api/src/Form/SettingsForm.php b/modules/quant_api/src/Form/SettingsForm.php index e1107499..c932eb6e 100644 --- a/modules/quant_api/src/Form/SettingsForm.php +++ b/modules/quant_api/src/Form/SettingsForm.php @@ -16,6 +16,13 @@ class SettingsForm extends ConfigFormBase { const SETTINGS = 'quant_api.settings'; + /** + * The Quant API client. + * + * @var \Drupal\quant_api\Client\QuantClientInterface + */ + protected $client; + /** * Build the form. */ diff --git a/modules/quant_search/src/Controller/Search.php b/modules/quant_search/src/Controller/Search.php index 640d602e..dad27b26 100644 --- a/modules/quant_search/src/Controller/Search.php +++ b/modules/quant_search/src/Controller/Search.php @@ -20,6 +20,13 @@ class Search extends ControllerBase { const SETTINGS = 'quant_api.settings'; + /** + * The Quant API client. + * + * @var \Drupal\quant_api\Client\QuantClientInterface + */ + protected $client; + /** * Build the form. */ diff --git a/modules/quant_search/src/Form/SearchEntitiesForm.php b/modules/quant_search/src/Form/SearchEntitiesForm.php index 5b974bc5..b5d02bcc 100644 --- a/modules/quant_search/src/Form/SearchEntitiesForm.php +++ b/modules/quant_search/src/Form/SearchEntitiesForm.php @@ -16,6 +16,13 @@ class SearchEntitiesForm extends ConfigFormBase { const SETTINGS = 'quant_search.entities.settings'; + /** + * The Quant API client. + * + * @var \Drupal\quant_api\Client\QuantClientInterface + */ + protected $client; + /** * Build the form. */ diff --git a/modules/quant_search/src/Form/SearchIndexForm.php b/modules/quant_search/src/Form/SearchIndexForm.php index 708d3d07..9e8f2e1a 100644 --- a/modules/quant_search/src/Form/SearchIndexForm.php +++ b/modules/quant_search/src/Form/SearchIndexForm.php @@ -16,6 +16,13 @@ class SearchIndexForm extends ConfigFormBase { const SETTINGS = 'quant_search.index.settings'; + /** + * The Quant API client. + * + * @var \Drupal\quant_api\Client\QuantClientInterface + */ + protected $client; + /** * Build the form. */ diff --git a/modules/quant_search/src/Form/SearchPagesForm.php b/modules/quant_search/src/Form/SearchPagesForm.php index 4a34bc30..1ae14f8c 100644 --- a/modules/quant_search/src/Form/SearchPagesForm.php +++ b/modules/quant_search/src/Form/SearchPagesForm.php @@ -16,6 +16,13 @@ class SearchPagesForm extends ConfigFormBase { const SETTINGS = 'quant_api.settings'; + /** + * The Quant API client. + * + * @var \Drupal\quant_api\Client\QuantClientInterface + */ + protected $client; + /** * Build the form. */ From 5032f0091067414cac79990a3f038aa27c2eaddf Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Mon, 29 Jan 2024 22:54:48 -0800 Subject: [PATCH 3/3] Updated variable in string for php 8.2 deprecation. --- modules/quant_search/src/Controller/Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quant_search/src/Controller/Search.php b/modules/quant_search/src/Controller/Search.php index dad27b26..0397ffe8 100644 --- a/modules/quant_search/src/Controller/Search.php +++ b/modules/quant_search/src/Controller/Search.php @@ -263,7 +263,7 @@ public static function generateSearchRecord($entity, $langcode = NULL) { foreach ($entity->getTranslationLanguages() as $code => $lang) { $language_label = \Drupal::service('string_translation')->translate($language->getName(), [], ['langcode' => $code]); - $record["language_${code}"] = $language_label; + $record["language_{$code}"] = $language_label; } }