diff --git a/js_component.info.yml b/js_component.info.yml
index ce9667f71ecbfad12a231010f0ecbe643bf1afeb..0f7134392b6ddd1d74864e2e9207568caf61f303 100644
--- a/js_component.info.yml
+++ b/js_component.info.yml
@@ -1,5 +1,5 @@
 type: module
 name: JS Component
 description: Define JS components as custom blocks from a theme or module.
-core_version_requirement: ^9.3 || ^10
+core_version_requirement: ^10.1 || ^11
 package: Other
diff --git a/src/EventSubscriber/JSComponentBuildEventSubscribe.php b/src/EventSubscriber/JSComponentBuildEventSubscribe.php
index 3b5a8d4bb79b00aa53fa63b3ce06e4de7e868c8b..a6343afa0c558193aca410b1c1a309d6bf4b98be 100644
--- a/src/EventSubscriber/JSComponentBuildEventSubscribe.php
+++ b/src/EventSubscriber/JSComponentBuildEventSubscribe.php
@@ -14,7 +14,7 @@ class JSComponentBuildEventSubscribe implements EventSubscriberInterface {
   /**
    * {@inheritDoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       Events::BUILD_COMPONENT_DATA => [
         ['buildJSComponentData'],
diff --git a/src/Plugin/Block/JSComponentBlockType.php b/src/Plugin/Block/JSComponentBlockType.php
index c03b80f6402e43b7d8b079e2ce459020b24671d3..3c1e57de2dc0f2a571510becc1c3d24485bf096f 100644
--- a/src/Plugin/Block/JSComponentBlockType.php
+++ b/src/Plugin/Block/JSComponentBlockType.php
@@ -26,6 +26,8 @@ use Drupal\Core\Render\ElementInfoManagerInterface;
 use Drupal\js_component\JSComponentManagerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Drupal\Core\Utility\Error;
+
 
 /**
  * Define JS component block.
@@ -218,7 +220,8 @@ class JSComponentBlockType extends BlockBase implements ContainerFactoryPluginIn
         $build += $this->buildComponentInlineTemplate();
       }
     } catch (\Exception $exception) {
-      watchdog_exception('js_component', $exception);
+      $logger = \Drupal::logger('js_component');
+      Error::logException($logger, $exception);
     }
 
     return $build;
@@ -392,7 +395,8 @@ class JSComponentBlockType extends BlockBase implements ContainerFactoryPluginIn
         $subform_state
       ]);
     } catch (\Exception $exception) {
-      watchdog_exception('js_component', $exception);
+      $logger = \Drupal::logger('js_component');
+      Error::logException($logger, $exception);
     }
 
     return $values;