summaryrefslogtreecommitdiffstats
path: root/lib/composer
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-03-09 14:21:15 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-09 14:21:38 +0100
commitd6ce7ac4654136010a8fc4e2fb9a4f4312503d38 (patch)
treef7ab4a9a2413159b47ebd09b411bb6435696de42 /lib/composer
parent6d10a2aece9ab4cce0f57f20594b9fcb9372a794 (diff)
downloadnextcloud-server-d6ce7ac4654136010a8fc4e2fb9a4f4312503d38.tar.gz
nextcloud-server-d6ce7ac4654136010a8fc4e2fb9a4f4312503d38.zip
Bump autoloader
Composer was updated so lets update the autoloader Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/composer')
-rw-r--r--lib/composer/composer/ClassLoader.php10
-rw-r--r--lib/composer/composer/LICENSE2
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php
index 4626994fd4d..2c72175e772 100644
--- a/lib/composer/composer/ClassLoader.php
+++ b/lib/composer/composer/ClassLoader.php
@@ -374,9 +374,13 @@ 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) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath.'\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ $length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file;
}
diff --git a/lib/composer/composer/LICENSE b/lib/composer/composer/LICENSE
index 1a28124886d..f27399a042d 100644
--- a/lib/composer/composer/LICENSE
+++ b/lib/composer/composer/LICENSE
@@ -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