From b736c89acf3679abb76f45b136735257ba0098ea Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Fri, 7 Aug 2020 10:14:47 +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 2604ee973..e8e7b5d6f 100644
--- a/modules/admin/lib/Controller/Federation.php
+++ b/modules/admin/lib/Controller/Federation.php
@@ -441,6 +441,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) . '] = '
                             . VarExporter::export($entityMetadata) . ";\n";
                     }
-- 
GitLab