tschikarski / shibboleth

TYPO3 CMS shibboleth extension
3 stars 9 forks source link

Fix autoloader when using composer #12

Closed stucki closed 7 years ago

stucki commented 7 years ago

The following will work for now:

diff --git a/composer.json b/composer.json
index d93e920..da39df7 100644
--- a/composer.json
+++ b/composer.json
@@ -23,6 +23,9 @@
     }
   ],
   "autoload": {
+    "files": [
+      "sv1/class.tx_shibboleth_sv1.php"
+    ],
     "psr-4": {
       "TrustCnct\\Shibboleth\\": "Classes"
     }
diff --git a/ext_localconf.php b/ext_localconf.php
index 3d1ad94..b3bdee4 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -49,7 +49,7 @@ if (is_array($subtypesArray)) {
                'quality' => 80,
                'os' => '',
                'exec' => '',
-               'className' => 'TrustCnct\\Shibboleth\\tx_shibboleth_sv1',
+               'className' => 'tx_shibboleth_sv1',
        )
 );

diff --git a/sv1/class.tx_shibboleth_sv1.php b/sv1/class.tx_shibboleth_sv1.php
index 4eb3f98..9489dfc 100644
--- a/sv1/class.tx_shibboleth_sv1.php
+++ b/sv1/class.tx_shibboleth_sv1.php
@@ -27,8 +27,6 @@
  * Hint: use extdeveval to insert/update function index above.
  */

-namespace TrustCnct\Shibboleth;
-
 use TrustCnct\Shibboleth\User\UserHandler;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
tschikarski commented 7 years ago

Fixed in branch 3.0-dev