From 3066f1f994cd12d2f037e1de7aae5b2456be4bdc Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Tue, 13 Nov 2018 20:04:25 +0000
Subject: [PATCH] Update SimpleSAML_Configuration usage to current namespaces

---
 lib/SimpleSAML/Utils/Config/Metadata.php               | 2 +-
 modules/saml/www/sp/metadata.php                       | 2 +-
 tests/modules/consent/lib/Auth/Process/ConsentTest.php | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/SimpleSAML/Utils/Config/Metadata.php b/lib/SimpleSAML/Utils/Config/Metadata.php
index 1d34039cb..7c66f290c 100644
--- a/lib/SimpleSAML/Utils/Config/Metadata.php
+++ b/lib/SimpleSAML/Utils/Config/Metadata.php
@@ -296,7 +296,7 @@ class Metadata
             $policy = ['Format' => $nameIdPolicy];
         } elseif (is_array($nameIdPolicy)) {
             // handle current configurations specifying an array in the NameIDPolicy config option
-            $nameIdPolicy_cf = \SimpleSAML_Configuration::loadFromArray($nameIdPolicy);
+            $nameIdPolicy_cf = \SimpleSAML\Configuration::loadFromArray($nameIdPolicy);
             $policy = [
                 'Format'      => $nameIdPolicy_cf->getString('Format', \SAML2\Constants::NAMEID_TRANSIENT),
                 'AllowCreate' => $nameIdPolicy_cf->getBoolean('AllowCreate', true),
diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php
index 89a580d36..1289d31e9 100644
--- a/modules/saml/www/sp/metadata.php
+++ b/modules/saml/www/sp/metadata.php
@@ -142,7 +142,7 @@ if ($certInfo !== null && array_key_exists('certData', $certInfo)) {
 $format = $spconfig->getValue('NameIDPolicy', null);
 if ($format !== null) {
     if (is_array($format)) {
-        $metaArray20['NameIDFormat'] = SimpleSAML_Configuration::loadFromArray($format)->getString(
+        $metaArray20['NameIDFormat'] = \SimpleSAML\Configuration::loadFromArray($format)->getString(
             'Format',
             \SAML2\Constants::NAMEID_TRANSIENT
         );
diff --git a/tests/modules/consent/lib/Auth/Process/ConsentTest.php b/tests/modules/consent/lib/Auth/Process/ConsentTest.php
index 1e1623147..e9008f3d6 100644
--- a/tests/modules/consent/lib/Auth/Process/ConsentTest.php
+++ b/tests/modules/consent/lib/Auth/Process/ConsentTest.php
@@ -16,7 +16,7 @@ class ConsentTest extends TestCase
     public function setUp()
     {
         $this->config = Configuration::loadFromArray(['module.enable' => ['consent' => true]], '[ARRAY]', 'simplesaml');
-        \SimpleSAML_Configuration::setPreLoadedConfig($this->config, 'config.php');
+        Configuration::setPreLoadedConfig($this->config, 'config.php');
     }
 
     /**
-- 
GitLab