From 9a193aa4229bd2f836c6beb492c2530f81d6eab6 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Wed, 19 Aug 2020 08:25:36 +0000
Subject: [PATCH] Remove any 'expire' from the output of the MetadataConverter.

Although strictly 'less correct'. When manually converting
metadata, this is not such a useful note, and frequently gives
rise to trouble when the output is copied to somewhere static.
---
 modules/admin/lib/Controller/Federation.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/admin/lib/Controller/Federation.php b/modules/admin/lib/Controller/Federation.php
index 0b4d1a4a0..c2cd1176c 100644
--- a/modules/admin/lib/Controller/Federation.php
+++ b/modules/admin/lib/Controller/Federation.php
@@ -432,6 +432,13 @@ class Federation
                      */
                     unset($entityMetadata['entityDescriptor']);
 
+                    /**
+                     * Remove any expire from the metadata. This is not so useful
+                     * for manually converted metadata and frequently gives rise
+                     * to unexpected results when copy-pased statically.
+                     */
+                    unset($entityMetadata['expire']);
+
                     $text .= '$metadata[' . var_export($entityId, true) . '] = '
                         . var_export($entityMetadata, true) . ";\n";
                 }
-- 
GitLab