From 5b16404d78381beaa315ad7ec92b73e396f97cf1 Mon Sep 17 00:00:00 2001
From: lukasmatusiewicz <77617779+lukasmatusiewicz@users.noreply.github.com>
Date: Thu, 7 Mar 2024 13:01:38 +0100
Subject: [PATCH] remove autoloader

---
 src/AuthenticationStatus.php  |  2 --
 src/Client-Autoloader.php     | 32 --------------------------------
 src/PIBadRequestException.php |  4 +---
 src/PIChallenge.php           |  2 --
 src/PILog.php                 |  2 --
 src/PIResponse.php            |  2 --
 src/PrivacyIDEA.php           |  2 --
 7 files changed, 1 insertion(+), 45 deletions(-)
 delete mode 100644 src/Client-Autoloader.php

diff --git a/src/AuthenticationStatus.php b/src/AuthenticationStatus.php
index 95b1a3f..1f2aeea 100644
--- a/src/AuthenticationStatus.php
+++ b/src/AuthenticationStatus.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 abstract class AuthenticationStatus
 {
     const CHALLENGE = "CHALLENGE";
diff --git a/src/Client-Autoloader.php b/src/Client-Autoloader.php
deleted file mode 100644
index 6e674ef..0000000
--- a/src/Client-Autoloader.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/*
- * Copyright 2024 NetKnights GmbH - lukas.matusiewicz@netknights.it
- * <p>
- * Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
- * you may not use this file except in compliance with the License.
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-spl_autoload_register('autoLoader');
-
-/**
- * This autoloader includes the privacyIDEA-PHP-Client files to the project.
- */
-function autoLoader($className): bool
-{
-    $fullPath = dirname(__FILE__) . "/" . $className . ".php";
-    if (file_exists($fullPath))
-    {
-        require_once $fullPath;
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
\ No newline at end of file
diff --git a/src/PIBadRequestException.php b/src/PIBadRequestException.php
index 6b15404..cc70302 100644
--- a/src/PIBadRequestException.php
+++ b/src/PIBadRequestException.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 class PIBadRequestException extends Exception
 {
-}
+}
\ No newline at end of file
diff --git a/src/PIChallenge.php b/src/PIChallenge.php
index a5c8eff..b11fd41 100644
--- a/src/PIChallenge.php
+++ b/src/PIChallenge.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 class PIChallenge
 {
     /* @var string Type of token this challenge is for. */
diff --git a/src/PILog.php b/src/PILog.php
index df37d6f..7945d84 100644
--- a/src/PILog.php
+++ b/src/PILog.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 /**
  * Logging interface. This is used to relay the log
  * messages of the PHP-Client to the logger
diff --git a/src/PIResponse.php b/src/PIResponse.php
index cacc881..4ac9e13 100644
--- a/src/PIResponse.php
+++ b/src/PIResponse.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 class PIResponse
 {
     /* @var string Combined messages of all triggered token. */
diff --git a/src/PrivacyIDEA.php b/src/PrivacyIDEA.php
index 6b860a8..7dbc74a 100644
--- a/src/PrivacyIDEA.php
+++ b/src/PrivacyIDEA.php
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-//namespace PrivacyIDEA\PHPClient;
-
 const AUTHENTICATORDATA = "authenticatordata";
 const CLIENTDATA = "clientdata";
 const SIGNATUREDATA = "signaturedata";
-- 
GitLab