summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-12 23:16:10 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-12 23:16:10 +0100
commitf578b69729f09a763b8c323b94b0df76a9d6b5dd (patch)
tree2bc16c6ae9e025f12a0191fba0a6e189b2c99f2c /apps/admin_audit
parent3dc7d0fb900eec8b792768505299ba73300efb89 (diff)
downloadnextcloud-server-f578b69729f09a763b8c323b94b0df76a9d6b5dd.tar.gz
nextcloud-server-f578b69729f09a763b8c323b94b0df76a9d6b5dd.zip
Update composer
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/composer/composer/ClassLoader.php15
-rw-r--r--apps/admin_audit/composer/composer/autoload_static.php9
2 files changed, 14 insertions, 10 deletions
diff --git a/apps/admin_audit/composer/composer/ClassLoader.php b/apps/admin_audit/composer/composer/ClassLoader.php
index c6f6d2322bb..dc02dfb114f 100644
--- a/apps/admin_audit/composer/composer/ClassLoader.php
+++ b/apps/admin_audit/composer/composer/ClassLoader.php
@@ -43,8 +43,7 @@ namespace Composer\Autoload;
class ClassLoader
{
// PSR-4
- private $firstCharsPsr4 = array();
- private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
+ private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
@@ -171,10 +170,11 @@ class ClassLoader
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
- if ('\\' !== substr($prefix, -1)) {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
- $this->firstCharsPsr4[$prefix[0]] = true;
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
@@ -221,10 +221,11 @@ class ClassLoader
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
- if ('\\' !== substr($prefix, -1)) {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
- $this->firstCharsPsr4[$prefix[0]] = true;
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
@@ -372,7 +373,7 @@ class ClassLoader
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
- if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
+ if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
diff --git a/apps/admin_audit/composer/composer/autoload_static.php b/apps/admin_audit/composer/composer/autoload_static.php
index ea5988b59ff..b5f055de44e 100644
--- a/apps/admin_audit/composer/composer/autoload_static.php
+++ b/apps/admin_audit/composer/composer/autoload_static.php
@@ -6,8 +6,11 @@ namespace Composer\Autoload;
class ComposerStaticInitAdminAudit
{
- public static $firstCharsPsr4 = array (
- 'O' => true,
+ public static $prefixLengthsPsr4 = array (
+ 'O' =>
+ array (
+ 'OCA\\AdminAudit\\' => 15,
+ ),
);
public static $prefixDirsPsr4 = array (
@@ -34,7 +37,7 @@ class ComposerStaticInitAdminAudit
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->firstCharsPsr4 = ComposerStaticInitAdminAudit::$firstCharsPsr4;
+ $loader->prefixLengthsPsr4 = ComposerStaticInitAdminAudit::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitAdminAudit::$classMap;