From 419f63ccf8081caae3d15f39200a4f6533b80df8 Mon Sep 17 00:00:00 2001
From: sarwan verma <64740-sarwan@users.noreply.drupalcode.org>
Date: Thu, 8 Aug 2024 08:23:38 +0000
Subject: [PATCH] Issue #3462066 by sarwan_verma: Replace README.txt with
 README.md and update file format

---
 README.md  | 37 +++++++++++++++++++++++++++++++++++++
 README.txt | 43 -------------------------------------------
 2 files changed, 37 insertions(+), 43 deletions(-)
 create mode 100644 README.md
 delete mode 100644 README.txt

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a94e90c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+# serialization_cache Module
+
+[Project Page](http://drupal.org/project/serialization_cache)
+
+## Contents
+
+1. [About](#about)
+2. [Installation](#installation)
+3. [Credits](#credits)
+
+## About
+
+The Drupal 8 serialization system is quite flexible but can be time-consuming when processing all entities recursively, including their fields and embedded entities. This module provides caching for normalized entities and embedded entities by using different caches for different accesses, such as checking "view" permissions for an entity and its fields.
+
+## Installation
+
+1. **Install the module**: Follow the standard installation instructions for Drupal modules. For detailed steps, refer to [Drupal Installation Guide](https://www.drupal.org/node/1897420).
+
+2. **Override the serializer service**: The module overrides the default `serializer` service with `AccessCachingSerializer`. This is done automatically by the module. Alternatively, you can achieve this in your own module by implementing the `ServiceModifierInterface`. Here's an example:
+
+    ```php
+    use Drupal\Core\DependencyInjection\ContainerBuilder;
+    use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+    use Drupal\serialization_cache\AccessCachingSerializer;
+
+    class YourModuleServiceProvider implements ServiceModifierInterface {
+      public function alter(ContainerBuilder $container) {
+        if ($container->hasDefinition('serializer')) {
+          $container->getDefinition('serializer')->setClass(AccessCachingSerializer::class);
+        }
+      }
+    }
+    ```
+
+## Credits
+
+For more information, visit the [project page](http://drupal.org/project/serialization_cache).
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 7d40a06..0000000
--- a/README.txt
+++ /dev/null
@@ -1,43 +0,0 @@
---------------------------------------------------------------------------------
-  serialization_cache module Readme
-  http://drupal.org/project/serialization_cache
---------------------------------------------------------------------------------
-
-Contents:
-=========
-1. ABOUT
-2. INSTALLATION
-3. CREDITS
-
-1. ABOUT
-========
-
-Drupal 8 serialization system is pretty flexible but it causes serious time cost
-to recursively process all entities, their fields, embed entities if they are
-exist and etc.
-This module provides caching for normalized entities (+embedded entities)
-using different caches for different accesses (checking "view" for entity and
-its fields).
-
-2. INSTALLATION
-===============
-
-First step: install as usual, see https://www.drupal.org/node/1897420 for
-further information.
-
-Second step: you need to override your current "serializer" service with the
-AccessCachingSerializer. This module already does it.
-Alternatively you can do it like so in your own module:
-
-class YourModuleServiceProvider implements ServiceModifierInterface {
-  public function alter(ContainerBuilder $container) {
-    if ($container->hasDefinition('serializer')) {
-      $container->getDefinition('serializer')->setClass(AccessCachingSerializer::class);
-    }
-  }
-}
-
-4. CREDITS
-==========
-
-Project page: http://drupal.org/project/serialization_cache
-- 
GitLab