Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer updated #7702

Merged
merged 1 commit into from
Jan 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions apps/admin_audit/composer/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $firstCharsPsr4 = array();
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();

Expand Down Expand Up @@ -170,11 +171,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
Expand Down Expand Up @@ -221,11 +221,10 @@ public function setPsr4($prefix, $paths)
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
Expand Down Expand Up @@ -373,15 +372,15 @@ private function findFileWithExtension($class, $ext)
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
$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) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
Expand Down
9 changes: 3 additions & 6 deletions apps/admin_audit/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

class ComposerStaticInitAdminAudit
{
public static $prefixLengthsPsr4 = array (
'O' =>
array (
'OCA\\AdminAudit\\' => 15,
),
public static $firstCharsPsr4 = array (
'O' => true,
);

public static $prefixDirsPsr4 = array (
Expand All @@ -37,7 +34,7 @@ class ComposerStaticInitAdminAudit
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitAdminAudit::$prefixLengthsPsr4;
$loader->firstCharsPsr4 = ComposerStaticInitAdminAudit::$firstCharsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitAdminAudit::$classMap;

Expand Down
19 changes: 9 additions & 10 deletions apps/comments/composer/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $firstCharsPsr4 = array();
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();

Expand Down Expand Up @@ -170,11 +171,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
Expand Down Expand Up @@ -221,11 +221,10 @@ public function setPsr4($prefix, $paths)
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
Expand Down Expand Up @@ -373,15 +372,15 @@ private function findFileWithExtension($class, $ext)
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
$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) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
Expand Down
9 changes: 3 additions & 6 deletions apps/comments/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

class ComposerStaticInitComments
{
public static $prefixLengthsPsr4 = array (
'O' =>
array (
'OCA\\Comments\\' => 13,
),
public static $firstCharsPsr4 = array (
'O' => true,
);

public static $prefixDirsPsr4 = array (
Expand All @@ -37,7 +34,7 @@ class ComposerStaticInitComments
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitComments::$prefixLengthsPsr4;
$loader->firstCharsPsr4 = ComposerStaticInitComments::$firstCharsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitComments::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitComments::$classMap;

Expand Down
19 changes: 9 additions & 10 deletions apps/dav/composer/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $firstCharsPsr4 = array();
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();

Expand Down Expand Up @@ -170,11 +171,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
Expand Down Expand Up @@ -221,11 +221,10 @@ public function setPsr4($prefix, $paths)
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
Expand Down Expand Up @@ -373,15 +372,15 @@ private function findFileWithExtension($class, $ext)
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
$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) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
Expand Down
9 changes: 3 additions & 6 deletions apps/dav/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

class ComposerStaticInitDAV
{
public static $prefixLengthsPsr4 = array (
'O' =>
array (
'OCA\\DAV\\' => 8,
),
public static $firstCharsPsr4 = array (
'O' => true,
);

public static $prefixDirsPsr4 = array (
Expand Down Expand Up @@ -169,7 +166,7 @@ class ComposerStaticInitDAV
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitDAV::$prefixLengthsPsr4;
$loader->firstCharsPsr4 = ComposerStaticInitDAV::$firstCharsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitDAV::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitDAV::$classMap;

Expand Down
19 changes: 9 additions & 10 deletions apps/encryption/composer/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $firstCharsPsr4 = array();
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();

Expand Down Expand Up @@ -170,11 +171,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
Expand Down Expand Up @@ -221,11 +221,10 @@ public function setPsr4($prefix, $paths)
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
Expand Down Expand Up @@ -373,15 +372,15 @@ private function findFileWithExtension($class, $ext)
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
$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) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
Expand Down
9 changes: 3 additions & 6 deletions apps/encryption/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

class ComposerStaticInitEncryption
{
public static $prefixLengthsPsr4 = array (
'O' =>
array (
'OCA\\Encryption\\' => 15,
),
public static $firstCharsPsr4 = array (
'O' => true,
);

public static $prefixDirsPsr4 = array (
Expand Down Expand Up @@ -53,7 +50,7 @@ class ComposerStaticInitEncryption
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4;
$loader->firstCharsPsr4 = ComposerStaticInitEncryption::$firstCharsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitEncryption::$classMap;

Expand Down
19 changes: 9 additions & 10 deletions apps/federatedfilesharing/composer/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $firstCharsPsr4 = array();
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();

Expand Down Expand Up @@ -170,11 +171,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
Expand Down Expand Up @@ -221,11 +221,10 @@ public function setPsr4($prefix, $paths)
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
if ('\\' !== substr($prefix, -1)) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->firstCharsPsr4[$prefix[0]] = true;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
Expand Down Expand Up @@ -373,15 +372,15 @@ private function findFileWithExtension($class, $ext)
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
$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) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

class ComposerStaticInitFederatedFileSharing
{
public static $prefixLengthsPsr4 = array (
'O' =>
array (
'OCA\\FederatedFileSharing\\' => 25,
),
public static $firstCharsPsr4 = array (
'O' => true,
);

public static $prefixDirsPsr4 = array (
Expand Down Expand Up @@ -38,7 +35,7 @@ class ComposerStaticInitFederatedFileSharing
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixLengthsPsr4;
$loader->firstCharsPsr4 = ComposerStaticInitFederatedFileSharing::$firstCharsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap;

Expand Down
Loading