From da257a50b01cd9ef5f53ceb292b4830dd3e0431d Mon Sep 17 00:00:00 2001
From: jeeva-innoraft <jeevanraj.r@innoraft.com>
Date: Fri, 30 May 2025 11:44:36 +0530
Subject: [PATCH 1/4] Add constraint for Current Theme Condition theme so it
 can be FullyValidatable

---
 core/modules/system/config/schema/system.schema.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml
index 88f34652b986..88afd7ad8731 100644
--- a/core/modules/system/config/schema/system.schema.yml
+++ b/core/modules/system/config/schema/system.schema.yml
@@ -512,3 +512,7 @@ condition.plugin.current_theme:
     theme:
       type: string
       label: Theme
+      constraints:
+        NotBlank: []
+        ExtensionName: []
+        ExtensionExists: theme
-- 
GitLab


From e6951225b78344f416fa977f362f1002e00be34a Mon Sep 17 00:00:00 2001
From: Christian Lopez Espinola <penyaskito@computer.org>
Date: Fri, 30 May 2025 09:14:35 +0200
Subject: [PATCH 2/4] Fix condition_test settings to use an enabled theme

---
 .../condition_test/config/install/condition_test.settings.yml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/system/tests/modules/condition_test/config/install/condition_test.settings.yml b/core/modules/system/tests/modules/condition_test/config/install/condition_test.settings.yml
index cb9312961822..658217298485 100644
--- a/core/modules/system/tests/modules/condition_test/config/install/condition_test.settings.yml
+++ b/core/modules/system/tests/modules/condition_test/config/install/condition_test.settings.yml
@@ -3,7 +3,7 @@
 visibility:
   current_theme:
     id: current_theme
-    theme: stable
+    theme: stark
     negate: false
     context_mapping: {  }
   request_path:
-- 
GitLab


From 5b15f06b693ca15a64c59a73d9bedb67862c0307 Mon Sep 17 00:00:00 2001
From: Libbna Mathew <libbna.mathew@gmail.com>
Date: Mon, 2 Jun 2025 15:51:45 +0530
Subject: [PATCH 3/4] added missing FullyValidatable constraint.

---
 core/modules/system/config/schema/system.schema.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml
index 88afd7ad8731..673ed7b57265 100644
--- a/core/modules/system/config/schema/system.schema.yml
+++ b/core/modules/system/config/schema/system.schema.yml
@@ -508,6 +508,8 @@ system.feature_flags:
 
 condition.plugin.current_theme:
   type: condition.plugin
+  constraints:
+    FullyValidatable: ~
   mapping:
     theme:
       type: string
-- 
GitLab


From 87eea0306d32ca87c346ddab42e6a23adf59d063 Mon Sep 17 00:00:00 2001
From: jeeva-innoraft <jeevanraj.r@innoraft.com>
Date: Tue, 8 Jul 2025 20:58:30 +0530
Subject: [PATCH 4/4] Add dependency for validation

---
 .../src/Plugin/Condition/CurrentThemeCondition.php     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php b/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php
index 3ed8129a6f0d..2ae71de8c1c1 100644
--- a/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php
+++ b/core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php
@@ -128,4 +128,14 @@ public function getCacheContexts() {
     return $contexts;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function calculateDependencies() {
+    if (!$this->configuration['theme']) {
+      return [];
+    }
+    return ['theme' => [$this->configuration['theme']]];
+  }
+
 }
-- 
GitLab