From c8d54c6503a7dc62d90a3256d55e04296968e239 Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Fri, 17 Apr 2020 15:29:37 +0200
Subject: [PATCH] FEAT #13694 TIME 0:20 Json pretty

---
 migration/20.10/migrateCustomXml.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/migration/20.10/migrateCustomXml.php b/migration/20.10/migrateCustomXml.php
index b223ee1e299..5422cd5ae2f 100644
--- a/migration/20.10/migrateCustomXml.php
+++ b/migration/20.10/migrateCustomXml.php
@@ -26,8 +26,9 @@ if (is_file($file)) {
             ];
         }
 
-        $jsonFile = json_encode($jsonFile);
-        file_put_contents('custom/custom.json', $jsonFile);
+        $fp = fopen('custom/custom.json', 'w');
+        fwrite($fp, json_encode($jsonFile, JSON_PRETTY_PRINT));
+        fclose($fp);
     }
     unlink($file);
     printf("Fichier custom/custom.xml migré en fichier json.\n");
-- 
GitLab