From e9cb3087db90a1ab1d57e06b8a1db39d74eaecbf Mon Sep 17 00:00:00 2001
From: Cor <30983-Oostie@users.noreply.drupalcode.org>
Date: Tue, 24 Sep 2024 14:46:46 +0000
Subject: [PATCH] Issue #3476315 by oostie, sarwan_verma: Error on
 configuration form on Drupal 11

---
 src/Form/JsonApiImageStylesAdminForm.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/Form/JsonApiImageStylesAdminForm.php b/src/Form/JsonApiImageStylesAdminForm.php
index 360e36c..5811422 100644
--- a/src/Form/JsonApiImageStylesAdminForm.php
+++ b/src/Form/JsonApiImageStylesAdminForm.php
@@ -3,6 +3,7 @@
 namespace Drupal\jsonapi_image_styles\Form;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Config\TypedConfigManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
@@ -28,8 +29,11 @@ class JsonApiImageStylesAdminForm extends ConfigFormBase {
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   Entity type manager.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
-    parent::__construct($config_factory);
+  public function __construct(
+    ConfigFactoryInterface $configFactory,
+    TypedConfigManagerInterface $typedConfigManager,
+    EntityTypeManagerInterface $entity_type_manager) {
+    parent::__construct($configFactory, $typedConfigManager);
     $this->entityTypeManager = $entity_type_manager;
   }
 
@@ -39,6 +43,7 @@ public function __construct(ConfigFactoryInterface $config_factory, EntityTypeMa
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('config.factory'),
+      $container->get('config.typed'),
       $container->get('entity_type.manager')
     );
   }
-- 
GitLab