Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/updater.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-08 00:42:23 +0300
committerGitHub <noreply@github.com>2022-04-08 00:42:23 +0300
commitbd6a4114864faec390044e8bb4f4505db73bfbce (patch)
tree468dc2f82bd68dd6da55045f848b8d5c629e0f0e
parentcba8874b3e72ddfa775e333a89f14068b8775eea (diff)
parentbaf5c82c2c5bde8767ba72330e7d026b7f8733f1 (diff)
build updater.phar
-rw-r--r--.drone.yml41
-rwxr-xr-xupdater.pharbin600659 -> 723250 bytes
-rw-r--r--vendor/composer/ClassLoader.php155
-rw-r--r--vendor/composer/autoload_classmap.php2
-rw-r--r--vendor/composer/autoload_real.php15
-rw-r--r--vendor/composer/autoload_static.php2
6 files changed, 166 insertions, 49 deletions
diff --git a/.drone.yml b/.drone.yml
index 762588b..9c6405d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -3,7 +3,7 @@ name: check-same-code-base
steps:
- name: check-same-code-base
- image: nextcloudci/php8.0:php8.0-1
+ image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
commands:
- make check-same-code-base
@@ -21,7 +21,7 @@ name: php73-cli
steps:
- name: php73-cli
- image: nextcloudci/php7.3:php7.3-5
+ image: ghcr.io/nextcloud/continuous-integration-php7.3:latest
commands:
- make test-cli
@@ -39,7 +39,7 @@ name: php74-cli
steps:
- name: php74-cli
- image: nextcloudci/php7.4:php7.4-3
+ image: ghcr.io/nextcloud/continuous-integration-php7.4:latest
commands:
- make test-cli
@@ -56,7 +56,7 @@ name: php73-stable19
steps:
- name: php73-stable19
- image: nextcloudci/php7.3:php7.3-5
+ image: ghcr.io/nextcloud/continuous-integration-php7.3:latest
commands:
- make test-stable19
@@ -74,7 +74,7 @@ name: php74-stable19
steps:
- name: php74-stable19
- image: nextcloudci/php7.4:php7.4-3
+ image: ghcr.io/nextcloud/continuous-integration-php7.4:latest
commands:
- make test-stable19
@@ -92,7 +92,7 @@ name: php73-stable20
steps:
- name: php73-stable20
- image: nextcloudci/php7.3:php7.3-5
+ image: ghcr.io/nextcloud/continuous-integration-php7.3:latest
commands:
- make test-stable20
@@ -110,7 +110,7 @@ name: php74-stable20
steps:
- name: php74-stable20
- image: nextcloudci/php7.4:php7.4-3
+ image: ghcr.io/nextcloud/continuous-integration-php7.4:latest
commands:
- make test-stable20
@@ -128,7 +128,7 @@ name: php73-stable21
steps:
- name: php73-stable21
- image: nextcloudci/php7.3:php7.3-5
+ image: ghcr.io/nextcloud/continuous-integration-php7.3:latest
commands:
- make test-stable21
@@ -146,7 +146,7 @@ name: php74-stable21
steps:
- name: php74-stable21
- image: nextcloudci/php7.4:php7.4-3
+ image: ghcr.io/nextcloud/continuous-integration-php7.4:latest
commands:
- make test-stable21
@@ -164,7 +164,7 @@ name: php80-stable21
steps:
- name: php80-stable21
- image: nextcloudci/php8.0:php8.0-1
+ image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
commands:
- make test-stable21
@@ -178,28 +178,11 @@ trigger:
---
kind: pipeline
-name: php73-master
-
-steps:
- - name: php73-master
- image: nextcloudci/php7.3:php7.3-2
- commands:
- - make test-master
-
-trigger:
- branch:
- - master
- - stable*
- event:
- - pull_request
- - push
----
-kind: pipeline
name: php74-master
steps:
- name: php74-master
- image: nextcloudci/php7.4:php7.4-2
+ image: ghcr.io/nextcloud/continuous-integration-php7.4:latest
commands:
- make test-master
@@ -217,7 +200,7 @@ name: php80-master
steps:
- name: php80-master
- image: nextcloudci/php8.0:php8.0-1
+ image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
commands:
- make test-master
diff --git a/updater.phar b/updater.phar
index e237009..a97391c 100755
--- a/updater.phar
+++ b/updater.phar
Binary files differ
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 03b9bb9..afef3fa 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -37,26 +37,80 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
- * @see http://www.php-fig.org/psr/psr-0/
- * @see http://www.php-fig.org/psr/psr-4/
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
+ /** @var ?string */
+ private $vendorDir;
+
// PSR-4
+ /**
+ * @var array[]
+ * @psalm-var array<string, array<string, int>>
+ */
private $prefixLengthsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array<string, array<int, string>>
+ */
private $prefixDirsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array<string, string>
+ */
private $fallbackDirsPsr4 = array();
// PSR-0
+ /**
+ * @var array[]
+ * @psalm-var array<string, array<string, string[]>>
+ */
private $prefixesPsr0 = array();
+ /**
+ * @var array[]
+ * @psalm-var array<string, string>
+ */
private $fallbackDirsPsr0 = array();
+ /** @var bool */
private $useIncludePath = false;
+
+ /**
+ * @var string[]
+ * @psalm-var array<string, string>
+ */
private $classMap = array();
+
+ /** @var bool */
private $classMapAuthoritative = false;
+
+ /**
+ * @var bool[]
+ * @psalm-var array<string, bool>
+ */
private $missingClasses = array();
+
+ /** @var ?string */
private $apcuPrefix;
+ /**
+ * @var self[]
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param ?string $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ }
+
+ /**
+ * @return string[]
+ */
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -66,28 +120,47 @@ class ClassLoader
return array();
}
+ /**
+ * @return array[]
+ * @psalm-return array<string, array<int, string>>
+ */
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
+ /**
+ * @return array[]
+ * @psalm-return array<string, string>
+ */
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
+ /**
+ * @return array[]
+ * @psalm-return array<string, string>
+ */
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
+ /**
+ * @return string[] Array of classname => path
+ * @psalm-return array<string, string>
+ */
public function getClassMap()
{
return $this->classMap;
}
/**
- * @param array $classMap Class to filename map
+ * @param string[] $classMap Class to filename map
+ * @psalm-param array<string, string> $classMap
+ *
+ * @return void
*/
public function addClassMap(array $classMap)
{
@@ -102,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@@ -147,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@@ -195,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 base directories
+ *
+ * @return void
*/
public function set($prefix, $paths)
{
@@ -211,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -234,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
+ *
+ * @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -256,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
+ *
+ * @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -276,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
+ *
+ * @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@@ -296,25 +383,44 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
}
/**
* Unregisters this instance as an autoloader.
+ *
+ * @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@@ -323,6 +429,8 @@ class ClassLoader
return true;
}
+
+ return null;
}
/**
@@ -367,6 +475,21 @@ class ClassLoader
return $file;
}
+ /**
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
+ *
+ * @return self[]
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -438,6 +561,10 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ * @private
*/
function includeFile($file)
{
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 596d1e4..570762b 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'NC\\Updater\\CommandApplication' => $baseDir . '/lib/CommandApplication.php',
'NC\\Updater\\LogException' => $baseDir . '/lib/LogException.php',
'NC\\Updater\\RecursiveDirectoryIteratorWithoutData' => $baseDir . '/lib/RecursiveDirectoryIteratorWithoutData.php',
@@ -21,7 +22,6 @@ return array(
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
- 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php',
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 0e4904c..2096a58 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -22,13 +22,15 @@ class ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6
return self::$loader;
}
+ require __DIR__ . '/platform_check.php';
+
spl_autoload_register(array('ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
- require_once __DIR__ . '/autoload_static.php';
+ require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6::getInitializer($loader));
} else {
@@ -54,11 +56,16 @@ class ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6
}
}
+/**
+ * @param string $fileIdentifier
+ * @param string $file
+ * @return void
+ */
function composerRequire994b8d870ddb923ebc3ff0ceaaaa96a6($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
}
}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 6e5599b..ba2aacb 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -51,6 +51,7 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
);
public static $classMap = array (
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'NC\\Updater\\CommandApplication' => __DIR__ . '/../..' . '/lib/CommandApplication.php',
'NC\\Updater\\LogException' => __DIR__ . '/../..' . '/lib/LogException.php',
'NC\\Updater\\RecursiveDirectoryIteratorWithoutData' => __DIR__ . '/../..' . '/lib/RecursiveDirectoryIteratorWithoutData.php',
@@ -66,7 +67,6 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
- 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php',