diff --git a/google_api_client.api.php b/google_api_client.api.php
index 06905ba..85f51c9 100644
--- a/google_api_client.api.php
+++ b/google_api_client.api.php
@@ -1,5 +1,7 @@
 <?php
 
+use Drupal\Core\Access\AccessResult;
+
 /**
  * @file
  * Hooks provided by the Google Api Client module.
@@ -92,18 +94,18 @@ function hook_google_api_client_authenticate_account_access($google_api_client_i
     // If we want that only users with specific user id are allowed.
     $allowed_users = [1, 5, 10];
     if (in_array($user_account->id(), $allowed_users)) {
-      return \Drupal\Core\Access\AccessResult::allowed();
+      return AccessResult::allowed();
     }
     // If we want some role (say Google User role) to have access.
     if (in_array('google_user', $user_account->getRoles())) {
-      return \Drupal\Core\Access\AccessResult::allowed();
+      return AccessResult::allowed();
     }
     // Nothing passed access check, restrict authentication.
-    return \Drupal\Core\Access\AccessResult::forbidden();
+    return AccessResult::forbidden();
   }
   else {
     // We don't want to check access of this account.
-    return \Drupal\Core\Access\AccessResult::neutral();
+    return AccessResult::neutral();
   }
 }
 
diff --git a/google_api_client.install b/google_api_client.install
index 8084a2c..b70dd37 100755
--- a/google_api_client.install
+++ b/google_api_client.install
@@ -1,4 +1,11 @@
 <?php
+use Drupal\Core\Link;
+use Drupal\Core\Url;
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
+use Drupal\Component\Serialization\Json;
+use Drupal\Core\Field\BaseFieldDefinition;
+
 /**
  * @file
  * Install and uninstall functions for the Google api client module.
@@ -13,15 +20,15 @@ function google_api_client_requirements($phase) {
   }
 
   $library_exists = google_api_client_load_library();
-  $url = \Drupal\Core\Link::fromTextAndUrl(t('here'), \Drupal\Core\Url::fromUri('https://github.com/google/google-api-php-client/releases'))->toString();
-  $documentation = \Drupal\Core\Link::fromTextAndUrl(t('google api php client installation'), \Drupal\Core\Url::fromUri('https://github.com/google/google-api-php-client#installation'))->toString();
+  $url = Link::fromTextAndUrl(t('here'), Url::fromUri('https://github.com/google/google-api-php-client/releases'))->toString();
+  $documentation = Link::fromTextAndUrl(t('google api php client installation'), Url::fromUri('https://github.com/google/google-api-php-client#installation'))->toString();
   $version = isset($library_exists['versions']) && !empty($library_exists['versions']) ? array_keys($library_exists['versions']) : array('2.4.0');
   return [
     'google-api-php-client' => [
       'title' => t('Google Api PHP Client'),
       'value' => $library_exists ? t('Installed') . ' ' . Google_Client::LIBVER : t('Not installed'),
       'description' => $library_exists ? '' : t('Install version "@version" or latest version of the Google api php client library code (from %here) in a libraries directory such as "libraries/google-api-php-client". You can also use composer to install, read more at %documentation.', ['@version' => $version[0], '%here' => $url, '%documentation' => $documentation]),
-      'severity' => $library_exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
+      'severity' => $library_exists ? DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::OK, fn() => REQUIREMENT_OK) : DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Error, fn() => REQUIREMENT_ERROR),
     ],
   ];
 }
@@ -34,7 +41,7 @@ function google_api_client_update_8001() {
   $entity_type = \Drupal::entityTypeManager()->getDefinition('google_api_client');
   \Drupal::entityDefinitionUpdateManager()->installEntityType($entity_type);
   // Entity table is ready let's copy previous record as first account.
-  $settings = \Drupal\Component\Serialization\Json::decode(\Drupal::config('google_api_client.settings')->get('credentials'));
+  $settings = Json::decode(\Drupal::config('google_api_client.settings')->get('credentials'));
   $scopes = \Drupal::config('google_api_client.settings')->get('scopes');
   $scopes = array_map('trim', explode(PHP_EOL, $scopes));
 
@@ -53,7 +60,7 @@ function google_api_client_update_8001() {
   }
   $services = array_unique($services);
   $token = unserialize(\Drupal::config('google_api_client.tokens')->get('google_access_token'));
-  $token = \Drupal\Component\Serialization\Json::encode($token);
+  $token = Json::encode($token);
   $account = [
     'name' => 'Google Api Client',
     'client_id' => $settings['web']['client_id'],
@@ -98,7 +105,7 @@ function google_api_client_update_8803() {
     $definition_manager = \Drupal::entityDefinitionUpdateManager();
 
     // Create a new field definition.
-    $new_uuid_field = \Drupal\Core\Field\BaseFieldDefinition::create('uuid')
+    $new_uuid_field = BaseFieldDefinition::create('uuid')
       ->setLabel(t('UUID'))
       ->setDescription(t('The Google Api Client UUID.'))
       ->setReadOnly(TRUE);
diff --git a/google_api_client.module b/google_api_client.module
index bdafde2..a715282 100755
--- a/google_api_client.module
+++ b/google_api_client.module
@@ -1,4 +1,12 @@
 <?php
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\google_api_client\Hook\GoogleApiClientHooks;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Url;
+use Drupal\Core\Field\BaseFieldDefinition;
+use Drupal\Component\ClassFinder\ClassFinder;
+
 /**
  * @file
  * Google Api Client for drupal.
@@ -8,33 +16,17 @@
 /**
  * Implements hook_help().
  */
-function google_api_client_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    case 'help.page.google_api_client':
-      $path = $GLOBALS['base_url'] . '/' . \Drupal::service('extension.list.module')->getPath('google_api_client');
-      $output = '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t("This module allows you to authenticate with google and use this authentication to carry other api requests. This module will help you to manage accounts, authenticate with google (i.e. get access token) and use this authentication to carry api requests in other modules.") . '</p>';
-      $output .= '<h3>' . t('Uses') . '</h3>';
-      $output .= '<p>' . t("This module allows you to enter google account details like client id, client secret key, developer key, select google services to be enabled and gets the OAuth2 access token from google.  You can also revoke access(unauthenticate) a account.") . '</p>';
-      $output .= '<p>' . t("For more details read the <a href='@url'>README.txt</a> file in the Google Api Client module directory.", ['@url' => "$path/README.txt"]) . '</p>';
-      return $output;
-  }
+#[LegacyHook]
+function google_api_client_help($route_name, RouteMatchInterface $route_match) {
+  return \Drupal::service(GoogleApiClientHooks::class)->help($route_name, $route_match);
 }
 
 /**
  * Implements hook_entity_operation().
  */
-function google_api_client_entity_operation(\Drupal\Core\Entity\EntityInterface $entity) {
-  if ($entity->getEntityTypeId() == 'google_api_client') {
-    $operations = [];
-    $is_authenticated = $entity->getAuthenticated();
-    $operations['authenticate_revoke'] = [
-      'title' => $is_authenticated ? t('Revoke') : t('Authenticate'),
-      'url' => $is_authenticated ? \Drupal\Core\Url::fromRoute('entity.google_api_client.revoke_form', ['google_api_client' => $entity->getId()]) : \Drupal\Core\Url::fromRoute('google_api_client.callback', ['id' => $entity->getId()]),
-      'weight' => 50,
-    ];
-    return $operations;
-  }
+#[LegacyHook]
+function google_api_client_entity_operation(EntityInterface $entity) {
+  return \Drupal::service(GoogleApiClientHooks::class)->entityOperation($entity);
 }
 
 /**
@@ -62,7 +54,7 @@ function google_api_client_google_services_scopes($services, $by_pass_cache = FA
   }
 }
 
-function google_api_client_google_scopes_names(Drupal\Core\Field\BaseFieldDefinition $field, $entity, $cacheable) {
+function google_api_client_google_scopes_names(BaseFieldDefinition $field, $entity, $cacheable) {
   $services = _google_api_client_google_services_names();
   $services = array_keys($services);
   return google_api_client_google_services_scopes($services);
@@ -153,7 +145,7 @@ function _google_api_client_read_scope_info() {
  */
 function google_api_client_callback_url() {
   $is_https = \Drupal::request()->isSecure();
-  return \Drupal\Core\Url::fromRoute('google_api_client.callback', [], ['https' => $is_https, 'absolute' => TRUE])->toString();
+  return Url::fromRoute('google_api_client.callback', [], ['https' => $is_https, 'absolute' => TRUE])->toString();
 }
 
 /**
@@ -166,7 +158,7 @@ function google_api_client_callback_url() {
  *   Returns lib path if requested else true if loaded.
  */
 function google_api_client_load_library($return_path = FALSE) {
-  $finder = new \Drupal\Component\ClassFinder\ClassFinder();
+  $finder = new ClassFinder();
   $file = $finder->findFile('Google_Client');
   if ($file && class_exists('Google_Client') && strpos($file, 'vendor') !== FALSE) {
     // The library is available through Composer's autoloader.
diff --git a/google_api_client.services.yml b/google_api_client.services.yml
index 65f55b1..769fb3b 100644
--- a/google_api_client.services.yml
+++ b/google_api_client.services.yml
@@ -12,4 +12,7 @@ services:
     tags:
       - { name: cache.bin }
     factory: cache_factory:get
-    arguments: [google_api_client_scopes]
\ No newline at end of file
+    arguments: [google_api_client_scopes]
+  Drupal\google_api_client\Hook\GoogleApiClientHooks:
+    class: Drupal\google_api_client\Hook\GoogleApiClientHooks
+    autowire: true
diff --git a/src/Hook/GoogleApiClientHooks.php b/src/Hook/GoogleApiClientHooks.php
new file mode 100644
index 0000000..031fe45
--- /dev/null
+++ b/src/Hook/GoogleApiClientHooks.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace Drupal\google_api_client\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Url;
+use Drupal\Core\Field\BaseFieldDefinition;
+use Drupal\Component\ClassFinder\ClassFinder;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for google_api_client.
+ */
+class GoogleApiClientHooks
+{
+    use StringTranslationTrait;
+    /**
+     * @file
+     * Google Api Client for drupal.
+     */
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            case 'help.page.google_api_client':
+                $path = $GLOBALS['base_url'] . '/' . \Drupal::service('extension.list.module')->getPath('google_api_client');
+                $output = '<h3>' . $this->t('About') . '</h3>';
+                $output .= '<p>' . $this->t("This module allows you to authenticate with google and use this authentication to carry other api requests. This module will help you to manage accounts, authenticate with google (i.e. get access token) and use this authentication to carry api requests in other modules.") . '</p>';
+                $output .= '<h3>' . $this->t('Uses') . '</h3>';
+                $output .= '<p>' . $this->t("This module allows you to enter google account details like client id, client secret key, developer key, select google services to be enabled and gets the OAuth2 access token from google.  You can also revoke access(unauthenticate) a account.") . '</p>';
+                $output .= '<p>' . $this->t("For more details read the <a href='@url'>README.txt</a> file in the Google Api Client module directory.", [
+                    '@url' => "{$path}/README.txt",
+                ]) . '</p>';
+                return $output;
+        }
+    }
+    /**
+     * Implements hook_entity_operation().
+     */
+    #[Hook('entity_operation')]
+    public function entityOperation(\Drupal\Core\Entity\EntityInterface $entity)
+    {
+        if ($entity->getEntityTypeId() == 'google_api_client') {
+            $operations = [
+            ];
+            $is_authenticated = $entity->getAuthenticated();
+            $operations['authenticate_revoke'] = [
+                'title' => $is_authenticated ? $this->t('Revoke') : $this->t('Authenticate'),
+                'url' => $is_authenticated ? \Drupal\Core\Url::fromRoute('entity.google_api_client.revoke_form', [
+                    'google_api_client' => $entity->getId(),
+                ]) : \Drupal\Core\Url::fromRoute('google_api_client.callback', [
+                    'id' => $entity->getId(),
+                ]),
+                'weight' => 50,
+            ];
+            return $operations;
+        }
+    }
+}
