mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-04-28 07:14:52 +02:00
Use authoriative autoloader
So we don't try to load other classes with this autoloader. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
336a18387a
commit
577a92c94e
4
3rdparty/composer.json
vendored
4
3rdparty/composer.json
vendored
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"classmap-authoritative": true
|
||||
},
|
||||
"require": {
|
||||
"onelogin/php-saml": "^2.9"
|
||||
}
|
||||
|
|
12
3rdparty/vendor/composer/ClassLoader.php
vendored
12
3rdparty/vendor/composer/ClassLoader.php
vendored
|
@ -374,10 +374,14 @@ class ClassLoader
|
|||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
|
2
3rdparty/vendor/composer/LICENSE
vendored
2
3rdparty/vendor/composer/LICENSE
vendored
|
@ -1,5 +1,5 @@
|
|||
|
||||
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
11
3rdparty/vendor/composer/autoload_real.php
vendored
11
3rdparty/vendor/composer/autoload_real.php
vendored
|
@ -29,22 +29,13 @@ class ComposerAutoloaderInitcc75f134f7630c1ee3a8e4d7c86f3bcc
|
|||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitcc75f134f7630c1ee3a8e4d7c86f3bcc::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
return $loader;
|
||||
|
|
Loading…
Reference in a new issue