From 0c6120d2cddf4d6e4e2369ab9b3b1ac2a9e6cb37 Mon Sep 17 00:00:00 2001
From: Vladimir Roudakov <44088-VladimirAus@users.noreply.drupalcode.org>
Date: Wed, 28 May 2025 16:50:59 +0000
Subject: [PATCH 1/3] Issue #3526863 by vladimiraus: Drupal 11 compatibility

---
 .gitlab-ci.yml                | 30 ++++++++++++++++++++++++++++++
 composer.json                 | 12 ++++++++++++
 text_field_formatter.info.yml |  2 +-
 3 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 composer.json

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..68176cc
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,30 @@
+include:
+  - project: $_GITLAB_TEMPLATES_REPO
+    ref: $_GITLAB_TEMPLATES_REF
+    file:
+      - '/includes/include.drupalci.main.yml'
+      - '/includes/include.drupalci.variables.yml'
+      - '/includes/include.drupalci.workflows.yml'
+variables:
+  OPT_IN_TEST_PREVIOUS_MAJOR: 1
+  OPT_IN_TEST_NEXT_MINOR: 1
+  OPT_IN_TEST_NEXT_MAJOR: 0
+  RUN_JOB_UPGRADE_STATUS: 0
+cspell:
+  allow_failure: false
+phpcs:
+  allow_failure: false
+phpstan:
+  allow_failure: false
+phpstan (next minor):
+  allow_failure: true
+phpstan (next major):
+  allow_failure: false
+phpunit (previous major):
+  allow_failure: false
+phpunit (next minor):
+  allow_failure: false
+phpunit (next major):
+  allow_failure: false
+upgrade status:
+  allow_failure: false
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..c3d2b04
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,12 @@
+{
+    "name": "drupal/text_field_formatter",
+    "description": "A simple empty page solution. Assists in creating empty menu callbacks mostly used for pages that only consist of blocks.",
+    "type": "drupal-module",
+    "license": "GPL-2.0-or-later",
+    "homepage": "https://www.drupal.org/project/text_field_formatter",
+    "support": {
+        "issues": "https://www.drupal.org/project/issues/text_field_formatter",
+        "source": "https://git.drupalcode.org/project/text_field_formatter"
+    }
+  }
+  
\ No newline at end of file
diff --git a/text_field_formatter.info.yml b/text_field_formatter.info.yml
index b81686a..4ec8ea7 100644
--- a/text_field_formatter.info.yml
+++ b/text_field_formatter.info.yml
@@ -1,5 +1,5 @@
 name: 'Text Field Formatter'
 type: module
 description: 'This is the extension of the plain text field formatter with additional wrappers, classes and attributes.'
-core_version_requirement: ">=8"
+core_version_requirement: ^10.2 || ^11.0
 package: 'Field formatters'
-- 
GitLab


From 92472e54659a6f7ba25b81e28c5525b1cabd664d Mon Sep 17 00:00:00 2001
From: VladimirAus <vladimir@tomato-elephant-studio.com>
Date: Fri, 30 May 2025 20:27:32 +1000
Subject: [PATCH 2/3] Auto phpcs fixes.

---
 .../FieldFormatter/TextFieldFormatter.php     | 26 ++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php b/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php
index beedb8c..a3a2f0a 100644
--- a/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php
@@ -81,17 +81,19 @@ class TextFieldFormatter extends StringFormatter {
    * @param \Drupal\Core\Utility\Token $token
    *   The token service.
    */
-  public function __construct($plugin_id,
-                              $plugin_definition,
-                              FieldDefinitionInterface $field_definition,
-                              array $settings,
-                              $label,
-                              $view_mode,
-                              array $third_party_settings,
-                              EntityTypeManagerInterface $entity_type_manager,
-                              ModuleHandlerInterface $module_handler,
-                              MessengerInterface $messenger,
-                              Token $token) {
+  public function __construct(
+    $plugin_id,
+    $plugin_definition,
+    FieldDefinitionInterface $field_definition,
+    array $settings,
+    $label,
+    $view_mode,
+    array $third_party_settings,
+    EntityTypeManagerInterface $entity_type_manager,
+    ModuleHandlerInterface $module_handler,
+    MessengerInterface $messenger,
+    Token $token,
+  ) {
     parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $entity_type_manager);
 
     $this->moduleHandler = $module_handler;
@@ -372,7 +374,7 @@ class TextFieldFormatter extends StringFormatter {
       $attributes = explode("\r\n", $attributes);
       foreach ($attributes as $attribute) {
         $attribute = explode("|", $attribute);
-        $prepared[$attribute[0]] = isset($attribute[1]) ? $attribute[1] : '';
+        $prepared[$attribute[0]] = $attribute[1] ?? '';
       }
     }
 
-- 
GitLab


From f28048ba7119d4d28159312f444496e84a0eedd0 Mon Sep 17 00:00:00 2001
From: VladimirAus <vladimir@tomato-elephant-studio.com>
Date: Fri, 30 May 2025 20:29:54 +1000
Subject: [PATCH 3/3] Manual phpcs fixes.

---
 .gitlab-ci.yml | 1 +
 README.md      | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 68176cc..212ba76 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ variables:
   OPT_IN_TEST_NEXT_MINOR: 1
   OPT_IN_TEST_NEXT_MAJOR: 0
   RUN_JOB_UPGRADE_STATUS: 0
+  _CSPELL_WORDS: "epam,epam’s,levitsky,quickedit"
 cspell:
   allow_failure: false
 phpcs:
diff --git a/README.md b/README.md
index dec6104..803fa13 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,4 @@ Current maintainers:
 
 This project has been sponsored by:
 * EPAM Systems
-  Since 1993, EPAM Systems, Inc. (NYSE:EPAM) has leveraged its software engineering expertise to become a leading global product development, digital platform engineering, and top digital and product design agency. Through its ‘Engineering DNA’ and innovative strategy, consulting, and design capabilities, EPAM works in collaboration with its customers to deliver next-gen solutions that turn complex business challenges into real business outcomes. EPAM’s global teams serve customers in more than 30 countries across North America, Europe, Asia and Australia. As a recognized market leader in multiple categories among top global independent research agencies, EPAM was one of only four technology companies to appear on Forbes 25 Fastest Growing Public Tech Companies list every year of publication since 2013 and was the only IT services company featured on Fortune’s 100 Fastest-Growing Companies list of 2019.
-
 Learn more at www.epam.com
-- 
GitLab