From ef73ea4ce9d2227836170a61992f4a7137a11a0c Mon Sep 17 00:00:00 2001 From: amrita Date: Tue, 6 Feb 2024 15:23:30 +0545 Subject: [PATCH] bump share with me related changes --- classes/ocis_manager.php | 2 +- composer.json | 2 +- composer.lock | 22 +- vendor/autoload.php | 17 +- vendor/composer/ClassLoader.php | 137 ++--- vendor/composer/InstalledVersions.php | 17 +- vendor/composer/autoload_classmap.php | 37 ++ vendor/composer/autoload_psr4.php | 2 + vendor/composer/autoload_real.php | 27 +- vendor/composer/autoload_static.php | 50 ++ vendor/composer/installed.json | 512 +++++++++++++++++- vendor/composer/installed.php | 80 ++- vendor/owncloud/ocis-php-sdk/composer.json | 2 +- .../src/Exception/ExceptionHelper.php | 43 +- vendor/owncloud/ocis-php-sdk/src/Ocis.php | 10 +- .../ocis-php-sdk/src/ShareReceived.php | 208 ++----- 16 files changed, 880 insertions(+), 288 deletions(-) diff --git a/classes/ocis_manager.php b/classes/ocis_manager.php index 43e78ec4..820727bb 100644 --- a/classes/ocis_manager.php +++ b/classes/ocis_manager.php @@ -618,7 +618,7 @@ public function get_file_list(): array { if ($receivedshares !== null) { foreach ($receivedshares as $share) { if ( - $share->isClientSyncronize() === true && + $share->isClientSynchronized() === true && $share->getId() === $resource->getId() && $share->isUiHidden() === true ) { diff --git a/composer.json b/composer.json index 83b5dc13..d006afa5 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ } ], "require": { - "owncloud/ocis-php-sdk": "^1.0.0" + "owncloud/ocis-php-sdk": "dev-bump-ocis-latest-commit-id" }, "replace": { "guzzlehttp/guzzle": "*", diff --git a/composer.lock b/composer.lock index e9df98fb..0115e7d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e32c891ef2691d54736523e198263690", + "content-hash": "a1088b148d3a0455e7b724c6f6d291d6", "packages": [ { "name": "owncloud/libre-graph-api-php", @@ -69,22 +69,22 @@ }, { "name": "owncloud/ocis-php-sdk", - "version": "v1.0.0-rc.1", + "version": "dev-bump-ocis-latest-commit-id", "source": { "type": "git", "url": "https://github.com/owncloud/ocis-php-sdk.git", - "reference": "7f7da9e348729c1f4f30e14d58cc963ceb67459a" + "reference": "866dcc782ad9f26f5f30872a691de83db0b8ba5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/owncloud/ocis-php-sdk/zipball/7f7da9e348729c1f4f30e14d58cc963ceb67459a", - "reference": "7f7da9e348729c1f4f30e14d58cc963ceb67459a", + "url": "https://api.github.com/repos/owncloud/ocis-php-sdk/zipball/866dcc782ad9f26f5f30872a691de83db0b8ba5c", + "reference": "866dcc782ad9f26f5f30872a691de83db0b8ba5c", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", - "owncloud/libre-graph-api-php": "dev-main#cb414b614a1dc9dee1a320ea3862f56b11c3d70c", + "owncloud/libre-graph-api-php": "dev-main#c728b27030e08689768562ea3b79694f9e5b09aa", "php": "^8.1", "sabre/dav": "^4.6" }, @@ -104,10 +104,10 @@ "Apache-2.0" ], "support": { - "source": "https://github.com/owncloud/ocis-php-sdk/tree/v1.0.0-rc.1", + "source": "https://github.com/owncloud/ocis-php-sdk/tree/bump-ocis-latest-commit-id", "issues": "https://github.com/owncloud/ocis-php-sdk/issues" }, - "time": "2024-01-18T07:09:27+00:00" + "time": "2024-02-06T09:25:02+00:00" }, { "name": "psr/log", @@ -1076,10 +1076,12 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "owncloud/ocis-php-sdk": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/vendor/autoload.php b/vendor/autoload.php index 89fece88..124ed896 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -3,8 +3,21 @@ // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { - echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - exit(1); + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index afef3fa2..7824d8f7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,35 +42,37 @@ */ class ClassLoader { - /** @var ?string */ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixDirsPsr4 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * @var array[] - * @psalm-var array> + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> */ private $prefixesPsr0 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr0 = array(); @@ -78,8 +80,7 @@ class ClassLoader private $useIncludePath = false; /** - * @var string[] - * @psalm-var array + * @var array */ private $classMap = array(); @@ -87,29 +88,29 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var bool[] - * @psalm-var array + * @var array */ private $missingClasses = array(); - /** @var ?string */ + /** @var string|null */ private $apcuPrefix; /** - * @var self[] + * @var array */ private static $registeredLoaders = array(); /** - * @param ?string $vendorDir + * @param string|null $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); } /** - * @return string[] + * @return array> */ public function getPrefixes() { @@ -121,8 +122,7 @@ public function getPrefixes() } /** - * @return array[] - * @psalm-return array> + * @return array> */ public function getPrefixesPsr4() { @@ -130,8 +130,7 @@ public function getPrefixesPsr4() } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirs() { @@ -139,8 +138,7 @@ public function getFallbackDirs() } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirsPsr4() { @@ -148,8 +146,7 @@ public function getFallbackDirsPsr4() } /** - * @return string[] Array of classname => path - * @psalm-return array + * @return array Array of classname => path */ public function getClassMap() { @@ -157,8 +154,7 @@ public function getClassMap() } /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap + * @param array $classMap Class to filename map * * @return void */ @@ -175,24 +171,25 @@ public function addClassMap(array $classMap) * 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 string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -201,19 +198,19 @@ public function add($prefix, $paths, $prepend = false) $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -222,9 +219,9 @@ public function add($prefix, $paths, $prepend = false) * 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 string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -232,17 +229,18 @@ public function add($prefix, $paths, $prepend = false) */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -252,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false) throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -272,8 +270,8 @@ public function addPsr4($prefix, $paths, $prepend = false) * 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 string[]|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories * * @return void */ @@ -290,8 +288,8 @@ public function set($prefix, $paths) * 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 string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -425,7 +423,8 @@ public function unregister() public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + $includeFile = self::$includeFile; + $includeFile($file); return true; } @@ -476,9 +475,9 @@ public function findFile($class) } /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. + * Returns the currently registered loaders keyed by their corresponding vendor directories. * - * @return self[] + * @return array */ public static function getRegisteredLoaders() { @@ -555,18 +554,26 @@ private function findFileWithExtension($class, $ext) return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } } diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index c6b54af7..51e734a7 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -328,7 +328,9 @@ private static function getInstalled() if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -340,12 +342,17 @@ private static function getInstalled() // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 0fb0a2c1..b8478a16 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -7,4 +7,41 @@ return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', + 'PHPCSUtils\\BackCompat\\BCFile' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', + 'PHPCSUtils\\BackCompat\\BCTokens' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', + 'PHPCSUtils\\BackCompat\\Helper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', + 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', + 'PHPCSUtils\\Exceptions\\TestFileNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', + 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', + 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', + 'PHPCSUtils\\Fixers\\SpacesFixer' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', + 'PHPCSUtils\\Internal\\Cache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrList' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', + 'PHPCSUtils\\Internal\\NoFileCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', + 'PHPCSUtils\\Internal\\StableCollections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', + 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', + 'PHPCSUtils\\Tokens\\Collections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', + 'PHPCSUtils\\Tokens\\TokenHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', + 'PHPCSUtils\\Utils\\Arrays' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', + 'PHPCSUtils\\Utils\\Conditions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', + 'PHPCSUtils\\Utils\\Context' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', + 'PHPCSUtils\\Utils\\ControlStructures' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', + 'PHPCSUtils\\Utils\\FunctionDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', + 'PHPCSUtils\\Utils\\GetTokensAsString' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', + 'PHPCSUtils\\Utils\\Lists' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', + 'PHPCSUtils\\Utils\\MessageHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', + 'PHPCSUtils\\Utils\\Namespaces' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', + 'PHPCSUtils\\Utils\\NamingConventions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', + 'PHPCSUtils\\Utils\\Numbers' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', + 'PHPCSUtils\\Utils\\ObjectDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', + 'PHPCSUtils\\Utils\\Operators' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', + 'PHPCSUtils\\Utils\\Orthography' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', + 'PHPCSUtils\\Utils\\Parentheses' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', + 'PHPCSUtils\\Utils\\PassedParameters' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', + 'PHPCSUtils\\Utils\\Scopes' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', + 'PHPCSUtils\\Utils\\TextStrings' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', + 'PHPCSUtils\\Utils\\UseStatements' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', + 'PHPCSUtils\\Utils\\Variables' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 8b19d9f9..5d4fa3bc 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -13,6 +13,8 @@ 'Sabre\\Event\\' => array($vendorDir . '/sabre/event/lib'), 'Sabre\\' => array($vendorDir . '/sabre/dav/lib'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), 'Owncloud\\OcisPhpSdk\\' => array($vendorDir . '/owncloud/ocis-php-sdk/src'), 'OpenAPI\\Client\\' => array($vendorDir . '/owncloud/libre-graph-api-php/src'), + 'MoodleHQ\\MoodleCS\\moodle\\' => array($vendorDir . '/moodlehq/moodle-cs/moodle'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 030c5043..119d8dc4 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -33,25 +33,18 @@ public static function getLoader() $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit09c89e6e5da82c9d423c896384ac6d3f::$files; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire09c89e6e5da82c9d423c896384ac6d3f($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInit09c89e6e5da82c9d423c896384ac6d3f::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); } return $loader; } } - -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ -function composerRequire09c89e6e5da82c9d423c896384ac6d3f($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 1deddfe5..420b352c 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -29,12 +29,17 @@ class ComposerStaticInit09c89e6e5da82c9d423c896384ac6d3f 'P' => array ( 'Psr\\Log\\' => 8, + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 57, ), 'O' => array ( 'Owncloud\\OcisPhpSdk\\' => 20, 'OpenAPI\\Client\\' => 15, ), + 'M' => + array ( + 'MoodleHQ\\MoodleCS\\moodle\\' => 25, + ), ); public static $prefixDirsPsr4 = array ( @@ -66,6 +71,10 @@ class ComposerStaticInit09c89e6e5da82c9d423c896384ac6d3f array ( 0 => __DIR__ . '/..' . '/psr/log/src', ), + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => + array ( + 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', + ), 'Owncloud\\OcisPhpSdk\\' => array ( 0 => __DIR__ . '/..' . '/owncloud/ocis-php-sdk/src', @@ -74,10 +83,51 @@ class ComposerStaticInit09c89e6e5da82c9d423c896384ac6d3f array ( 0 => __DIR__ . '/..' . '/owncloud/libre-graph-api-php/src', ), + 'MoodleHQ\\MoodleCS\\moodle\\' => + array ( + 0 => __DIR__ . '/..' . '/moodlehq/moodle-cs/moodle', + ), ); public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', + 'PHPCSUtils\\BackCompat\\BCFile' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', + 'PHPCSUtils\\BackCompat\\BCTokens' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', + 'PHPCSUtils\\BackCompat\\Helper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', + 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', + 'PHPCSUtils\\Exceptions\\TestFileNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', + 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', + 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', + 'PHPCSUtils\\Fixers\\SpacesFixer' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', + 'PHPCSUtils\\Internal\\Cache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrList' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', + 'PHPCSUtils\\Internal\\NoFileCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', + 'PHPCSUtils\\Internal\\StableCollections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', + 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', + 'PHPCSUtils\\Tokens\\Collections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', + 'PHPCSUtils\\Tokens\\TokenHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', + 'PHPCSUtils\\Utils\\Arrays' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', + 'PHPCSUtils\\Utils\\Conditions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', + 'PHPCSUtils\\Utils\\Context' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', + 'PHPCSUtils\\Utils\\ControlStructures' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', + 'PHPCSUtils\\Utils\\FunctionDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', + 'PHPCSUtils\\Utils\\GetTokensAsString' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', + 'PHPCSUtils\\Utils\\Lists' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', + 'PHPCSUtils\\Utils\\MessageHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', + 'PHPCSUtils\\Utils\\Namespaces' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', + 'PHPCSUtils\\Utils\\NamingConventions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', + 'PHPCSUtils\\Utils\\Numbers' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', + 'PHPCSUtils\\Utils\\ObjectDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', + 'PHPCSUtils\\Utils\\Operators' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', + 'PHPCSUtils\\Utils\\Orthography' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', + 'PHPCSUtils\\Utils\\Parentheses' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', + 'PHPCSUtils\\Utils\\PassedParameters' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', + 'PHPCSUtils\\Utils\\Scopes' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', + 'PHPCSUtils\\Utils\\TextStrings' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', + 'PHPCSUtils\\Utils\\UseStatements' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', + 'PHPCSUtils\\Utils\\Variables' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 5892a3c3..9bf477a6 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,5 +1,156 @@ { "packages": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "time": "2023-01-05T11:28:13+00:00", + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" + }, + "install-path": "../dealerdirect/phpcodesniffer-composer-installer" + }, + { + "name": "moodlehq/moodle-cs", + "version": "v3.3.12", + "version_normalized": "3.3.12.0", + "source": { + "type": "git", + "url": "https://github.com/moodlehq/moodle-cs.git", + "reference": "9e3dcb07bfb3d0642f74e15253a5b44388782425" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moodlehq/moodle-cs/zipball/9e3dcb07bfb3d0642f74e15253a5b44388782425", + "reference": "9e3dcb07bfb3d0642f74e15253a5b44388782425", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", + "phpcompatibility/php-compatibility": "dev-develop#306cd263", + "phpcsstandards/phpcsextra": "^1.2.1", + "squizlabs/php_codesniffer": "^3.8.0" + }, + "replace": { + "moodlehq/moodle-local_codechecker": "3.1.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "overtrue/phplint": "^3.4.0 | ^9.0.4", + "phpmd/phpmd": "^2.11", + "phpunit/phpunit": "^9.6", + "sebastian/phpcpd": "^6.0", + "thor-juhasz/phpunit-coverage-check": "^0.3.0" + }, + "time": "2023-12-19T15:30:23+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "autoload": { + "psr-4": { + "MoodleHQ\\MoodleCS\\moodle\\": "moodle/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Andrew Lyons", + "email": "andrew@nicols.co.uk" + }, + { + "name": "Eloy Lafuente (stronk7)" + } + ], + "description": "Moodle Coding Sniffer rules", + "keywords": [ + "codesniffer", + "coding", + "moodle", + "phpcs", + "sniff", + "standard", + "style" + ], + "support": { + "issues": "https://github.com/moodlehq/moodle-cs/issues", + "source": "https://github.com/moodlehq/moodle-cs", + "wiki": "https://github.com/moodlehq/moodle-cs/wiki" + }, + "install-path": "../moodlehq/moodle-cs" + }, { "name": "owncloud/libre-graph-api-php", "version": "dev-main", @@ -66,23 +217,23 @@ }, { "name": "owncloud/ocis-php-sdk", - "version": "v1.0.0-rc.1", - "version_normalized": "1.0.0.0-RC1", + "version": "dev-bump-ocis-latest-commit-id", + "version_normalized": "dev-bump-ocis-latest-commit-id", "source": { "type": "git", "url": "https://github.com/owncloud/ocis-php-sdk.git", - "reference": "7f7da9e348729c1f4f30e14d58cc963ceb67459a" + "reference": "866dcc782ad9f26f5f30872a691de83db0b8ba5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/owncloud/ocis-php-sdk/zipball/7f7da9e348729c1f4f30e14d58cc963ceb67459a", - "reference": "7f7da9e348729c1f4f30e14d58cc963ceb67459a", + "url": "https://api.github.com/repos/owncloud/ocis-php-sdk/zipball/866dcc782ad9f26f5f30872a691de83db0b8ba5c", + "reference": "866dcc782ad9f26f5f30872a691de83db0b8ba5c", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", - "owncloud/libre-graph-api-php": "dev-main#cb414b614a1dc9dee1a320ea3862f56b11c3d70c", + "owncloud/libre-graph-api-php": "dev-main#c728b27030e08689768562ea3b79694f9e5b09aa", "php": "^8.1", "sabre/dav": "^4.6" }, @@ -92,7 +243,7 @@ "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10.5" }, - "time": "2024-01-18T07:09:27+00:00", + "time": "2024-02-06T09:25:02+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -104,11 +255,262 @@ "Apache-2.0" ], "support": { - "source": "https://github.com/owncloud/ocis-php-sdk/tree/v1.0.0-rc.1", + "source": "https://github.com/owncloud/ocis-php-sdk/tree/bump-ocis-latest-commit-id", "issues": "https://github.com/owncloud/ocis-php-sdk/issues" }, "install-path": "../owncloud/ocis-php-sdk" }, + { + "name": "phpcompatibility/php-compatibility", + "version": "dev-develop", + "version_normalized": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "34a67f7eb4ec715df26d90429ea8cce88e0b38ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/34a67f7eb4ec715df26d90429ea8cce88e0b38ff", + "reference": "34a67f7eb4ec715df26d90429ea8cce88e0b38ff", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.5", + "squizlabs/php_codesniffer": "^3.7.1" + }, + "replace": { + "wimg/php-compatibility": "*" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.3", + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.1.0", + "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" + }, + "suggest": { + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "time": "2023-12-04T17:28:03+00:00", + "default-branch": true, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev", + "dev-develop": "10.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibility/security/policy", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "install-path": "../phpcompatibility/php-compatibility" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "time": "2023-12-08T16:49:07+00:00", + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "install-path": "../phpcsstandards/phpcsextra" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "908247bc65010c7b7541a9551e002db12e9dae70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/908247bc65010c7b7541a9551e002db12e9dae70", + "reference": "908247bc65010c7b7541a9551e002db12e9dae70", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.8.0 || 4.0.x-dev@dev" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" + }, + "time": "2023-12-08T14:50:00+00:00", + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "install-path": "../phpcsstandards/phpcsutils" + }, { "name": "psr/log", "version": "3.0.0", @@ -624,8 +1026,98 @@ "source": "https://github.com/fruux/sabre-xml" }, "install-path": "../sabre/xml" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.8.1", + "version_normalized": "3.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "time": "2024-01-11T20:47:48+00:00", + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "install-path": "../squizlabs/php_codesniffer" } ], - "dev": false, - "dev-package-names": [] + "dev": true, + "dev-package-names": [ + "dealerdirect/phpcodesniffer-composer-installer", + "moodlehq/moodle-cs", + "phpcompatibility/php-compatibility", + "phpcsstandards/phpcsextra", + "phpcsstandards/phpcsutils", + "squizlabs/php_codesniffer" + ] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index dcecbbc5..d860a91b 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,13 +3,22 @@ 'name' => 'owncloud/moodle-repository_ocis', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'a4fd5829e33db2715d0726ef8d79a89adcf917fa', + 'reference' => '95edd79a85e00800c2e264611064fd6c0b5ab85b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'dev' => false, + 'dev' => true, ), 'versions' => array( + 'dealerdirect/phpcodesniffer-composer-installer' => array( + 'pretty_version' => 'v1.0.0', + 'version' => '1.0.0.0', + 'reference' => '4be43904336affa5c2f70744a348312336afd0da', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer', + 'aliases' => array(), + 'dev_requirement' => true, + ), 'guzzlehttp/guzzle' => array( 'dev_requirement' => false, 'replaced' => array( @@ -22,6 +31,21 @@ 0 => '*', ), ), + 'moodlehq/moodle-cs' => array( + 'pretty_version' => 'v3.3.12', + 'version' => '3.3.12.0', + 'reference' => '9e3dcb07bfb3d0642f74e15253a5b44388782425', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../moodlehq/moodle-cs', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'moodlehq/moodle-local_codechecker' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '3.1.0', + ), + ), 'owncloud/libre-graph-api-php' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', @@ -36,21 +60,50 @@ 'owncloud/moodle-repository_ocis' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'a4fd5829e33db2715d0726ef8d79a89adcf917fa', + 'reference' => '95edd79a85e00800c2e264611064fd6c0b5ab85b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'owncloud/ocis-php-sdk' => array( - 'pretty_version' => 'v1.0.0-rc.1', - 'version' => '1.0.0.0-RC1', - 'reference' => '7f7da9e348729c1f4f30e14d58cc963ceb67459a', + 'pretty_version' => 'dev-bump-ocis-latest-commit-id', + 'version' => 'dev-bump-ocis-latest-commit-id', + 'reference' => '866dcc782ad9f26f5f30872a691de83db0b8ba5c', 'type' => 'library', 'install_path' => __DIR__ . '/../owncloud/ocis-php-sdk', 'aliases' => array(), 'dev_requirement' => false, ), + 'phpcompatibility/php-compatibility' => array( + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '34a67f7eb4ec715df26d90429ea8cce88e0b38ff', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcompatibility/php-compatibility', + 'aliases' => array( + 0 => '10.x-dev', + ), + 'dev_requirement' => true, + ), + 'phpcsstandards/phpcsextra' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'reference' => '11d387c6642b6e4acaf0bd9bf5203b8cca1ec489', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcsstandards/phpcsextra', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpcsstandards/phpcsutils' => array( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'reference' => '908247bc65010c7b7541a9551e002db12e9dae70', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcsstandards/phpcsutils', + 'aliases' => array(), + 'dev_requirement' => true, + ), 'psr/log' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', @@ -114,5 +167,20 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'squizlabs/php_codesniffer' => array( + 'pretty_version' => '3.8.1', + 'version' => '3.8.1.0', + 'reference' => '14f5fff1e64118595db5408e946f3a22c75807f7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'wimg/php-compatibility' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), ), ); diff --git a/vendor/owncloud/ocis-php-sdk/composer.json b/vendor/owncloud/ocis-php-sdk/composer.json index f1c68123..ffa2ef81 100644 --- a/vendor/owncloud/ocis-php-sdk/composer.json +++ b/vendor/owncloud/ocis-php-sdk/composer.json @@ -16,7 +16,7 @@ "require": { "php": "^8.1", "sabre/dav": "^4.6", - "owncloud/libre-graph-api-php": "dev-main#cb414b614a1dc9dee1a320ea3862f56b11c3d70c", + "owncloud/libre-graph-api-php": "dev-main#c728b27030e08689768562ea3b79694f9e5b09aa", "ext-json": "*", "ext-curl": "*" }, diff --git a/vendor/owncloud/ocis-php-sdk/src/Exception/ExceptionHelper.php b/vendor/owncloud/ocis-php-sdk/src/Exception/ExceptionHelper.php index 9425ff45..b6d1d9af 100644 --- a/vendor/owncloud/ocis-php-sdk/src/Exception/ExceptionHelper.php +++ b/vendor/owncloud/ocis-php-sdk/src/Exception/ExceptionHelper.php @@ -4,6 +4,7 @@ use GuzzleHttp\Exception\GuzzleException; use OpenAPI\Client\ApiException; +use OpenAPI\Client\Model\OdataError; use Sabre\HTTP\ClientException as SabreClientException; use Sabre\HTTP\ClientHttpException as SabreClientHttpException; @@ -18,7 +19,7 @@ class ExceptionHelper * that is more specific to the HTTP error */ public static function getHttpErrorException( - GuzzleException|ApiException|SabreClientHttpException|SabreClientException $e + GuzzleException|ApiException|SabreClientHttpException|SabreClientException|HttpException $e ): BadRequestException| NotFoundException| ForbiddenException| @@ -90,4 +91,44 @@ public static function getHttpErrorException( ), }; } + + /** + * Takes an OdataError object and returns a custom exception + * that is more specific to the error if it has a numeric error code. + * Otherwise, it returns an InvalidResponseException + * + * @param string $methodName the name of the method that received the OdataError + */ + public static function getExceptionFromOdataError( + OdataError $odataError, + string $methodName + ): BadRequestException| + NotFoundException| + ForbiddenException| + UnauthorizedException| + HttpException| + ConflictException| + TooEarlyException| + InternalServerErrorException { + $error = $odataError->getError(); + $errorCode = $error->getCode(); + $errorMessage = $error->getMessage(); + if (is_numeric($errorCode)) { + $genericHttpException = new HttpException( + $errorMessage, + (int) $errorCode + ); + return self::getHttpErrorException($genericHttpException); + } + // The error code was not numeric, which is not really expected to happen. + // So throw an InternalServerErrorException with numeric code 500 and + // put the details in the exception message so that the caller has a chance + // to understand what happened. + return new InternalServerErrorException( + "$methodName returned an OdataError with code '" . + $errorCode . + "' and message '" . $errorMessage . "'", + 500 + ); + } } diff --git a/vendor/owncloud/ocis-php-sdk/src/Ocis.php b/vendor/owncloud/ocis-php-sdk/src/Ocis.php index 03adbc2e..3385f932 100644 --- a/vendor/owncloud/ocis-php-sdk/src/Ocis.php +++ b/vendor/owncloud/ocis-php-sdk/src/Ocis.php @@ -320,10 +320,7 @@ public function getAllDrives( throw ExceptionHelper::getHttpErrorException($e); } if ($allDrivesList instanceof OdataError) { - // ToDo: understand how this can happen, and what to do about it. - throw new InvalidResponseException( - "listAllDrives returned an OdataError - " . $allDrivesList->getError() - ); + throw ExceptionHelper::getExceptionFromOdataError($allDrivesList, "listAllDrives"); } $apiDrives = $allDrivesList->getValue(); $apiDrives = $apiDrives ?? []; @@ -380,10 +377,7 @@ public function getMyDrives( } if ($allDrivesList instanceof OdataError) { - // ToDo: understand how this can happen, and what to do about it. - throw new InvalidResponseException( - "listMyDrives returned an OdataError - " . $allDrivesList->getError() - ); + throw ExceptionHelper::getExceptionFromOdataError($allDrivesList, "listMyDrives"); } $apiDrives = $allDrivesList->getValue(); $apiDrives = $apiDrives ?? []; diff --git a/vendor/owncloud/ocis-php-sdk/src/ShareReceived.php b/vendor/owncloud/ocis-php-sdk/src/ShareReceived.php index d09f1ba0..04be6c8a 100644 --- a/vendor/owncloud/ocis-php-sdk/src/ShareReceived.php +++ b/vendor/owncloud/ocis-php-sdk/src/ShareReceived.php @@ -4,7 +4,6 @@ use OpenAPI\Client\Model\DriveItem; use OpenAPI\Client\Model\Identity; -use OpenAPI\Client\Model\ItemReference; use OpenAPI\Client\Model\Permission; use OpenAPI\Client\Model\RemoteItem; use Owncloud\OcisPhpSdk\Exception\InvalidResponseException; @@ -30,17 +29,13 @@ public function __construct( /** * @throws InvalidResponseException */ - public function getId(): ?string + public function getId(): string { - if (empty($this->shareReceived->getId()) && $this->isClientSyncronize() === false) { - return null; - } - if (empty($this->shareReceived->getId()) && $this->isClientSyncronize() === true) { - throw new InvalidResponseException( + return empty($this->shareReceived->getId()) + ? throw new InvalidResponseException( "Invalid Id '" . print_r($this->shareReceived->getId(), true) . "'" - ); - } - return $this->shareReceived->getId(); + ) + : $this->shareReceived->getId(); } /** @@ -59,79 +54,28 @@ public function getName(): string /** * @throws InvalidResponseException */ - public function getEtag(): ?string + public function getEtag(): string { - if (empty($this->shareReceived->getETag()) && $this->isClientSyncronize() === false) { - return null; - } - if (empty($this->shareReceived->getETag()) && $this->isClientSyncronize() === true) { - throw new InvalidResponseException( + return empty($this->shareReceived->getETag()) + ? throw new InvalidResponseException( "Invalid Etag '" . print_r($this->shareReceived->getETag(), true) . "'" - ); - } - return $this->shareReceived->getETag(); - } - - /** - * @throws InvalidResponseException - */ - private function getParentReference(): ?ItemReference - { - if (empty($this->shareReceived->getParentReference()) && $this->isClientSyncronize() === false) { - return null; - } - if (empty($this->shareReceived->getParentReference()) && $this->isClientSyncronize() === true) { - throw new InvalidResponseException( - "Invalid parentReference of received share '" . - print_r($this->shareReceived->getParentReference(), true) . "'" - ); - } - return $this->shareReceived->getParentReference(); + ) + : $this->shareReceived->getETag(); } /** + * @return \DateTimeImmutable * @throws InvalidResponseException */ - public function getParentDriveId(): ?string + public function getLastModifiedDateTime(): \DateTimeImmutable { - $parentReference = $this->getParentReference(); - if ($parentReference === null) { - return null; - } - if (empty($parentReference->getDriveId()) && $this->isClientSyncronize() === false) { - return null; - } - if (empty($parentReference->getDriveId()) && $this->isClientSyncronize() === true) { + $time = $this->shareReceived->getLastModifiedDateTime(); + if (empty($time)) { throw new InvalidResponseException( - "Invalid driveId returned in parentReference of received share '" . - print_r($parentReference->getDriveId(), true) . "'" + "Invalid shared modified DateTime'" . print_r($time, true) . "'" ); } - return $parentReference->getDriveId(); - } - - /** - * @throws InvalidResponseException - */ - public function getParentDriveType(): ?DriveType - { - $parentReference = $this->getParentReference(); - if ($parentReference === null) { - return null; - } - if (empty($parentReference->getDriveType()) && $this->isClientSyncronize() === false) { - return null; - } - $driveTypeString = (string)$parentReference->getDriveType(); - $driveType = DriveType::tryFrom($driveTypeString); - if ($driveType instanceof DriveType) { - return $driveType; - } - - throw new InvalidResponseException( - 'Invalid driveType returned in parentReference of received share: "' . - print_r($driveTypeString, true) . '"' - ); + return \DateTimeImmutable::createFromMutable($time); } /** @@ -139,9 +83,9 @@ public function getParentDriveType(): ?DriveType */ private function getRemoteItem(): RemoteItem { - return empty($this -> shareReceived -> getRemoteItem()) + return empty($this->shareReceived->getRemoteItem()) ? throw new InvalidResponseException( - "Invalid remote item '" . print_r($this -> shareReceived -> getParentReference(), true) . "'" + "Invalid remote item '" . print_r($this->shareReceived->getParentReference(), true) . "'" ) : $this->shareReceived->getRemoteItem(); } @@ -159,113 +103,54 @@ public function getRemoteItemId(): string : $remoteItem->getId(); } - /** - * @return string - * @throws InvalidResponseException - */ - public function getRemoteItemName(): string - { - $remoteItem = $this->getRemoteItem(); - return empty($remoteItem->getName()) - ? throw new InvalidResponseException( - "Invalid remote item name '" . print_r($remoteItem, true) . "'" - ) - : $remoteItem->getName(); - } - - /** - * @return int - * @throws InvalidResponseException - */ - public function getRemoteItemSize(): int - { - $remoteItem = $this->getRemoteItem(); - return empty($remoteItem->getSize()) - ? throw new InvalidResponseException( - "Invalid remote item size '" . print_r($remoteItem, true) . "'" - ) - : $remoteItem->getSize(); - } - /** * @throws InvalidResponseException */ - private function getShared(): \OpenAPI\Client\Model\Shared + private function getCreatedByUser(): Identity { - $remoteItem = $this->getRemoteItem(); - - return empty($remoteItem->getShared()) ? + return empty($this->shareReceived->getCreatedBy()) + || empty($this->shareReceived->getCreatedBy()->getUser()) ? throw new InvalidResponseException( - "Invalid shared '" . print_r($remoteItem, true) . "'" - ) : $remoteItem->getShared(); + "Invalid share createdBy information '" . print_r($this->shareReceived->getCreatedBy(), true) . "'" + ) : $this->shareReceived->getCreatedBy()->getUser(); } /** - * @return \DateTimeImmutable * @throws InvalidResponseException */ - public function getRemoteItemSharedDateTime(): \DateTimeImmutable + public function getCreatedByUserName(): string { - $sharedInfo = $this->getShared(); - $time = $sharedInfo->getSharedDateTime(); - if (empty($time)) { - throw new InvalidResponseException( - "Invalid shared DateTime'" . print_r($sharedInfo->getSharedDateTime(), true) . "'" - ); - } - return \DateTimeImmutable::createFromMutable($time); - } - - /** - * @throws InvalidResponseException - */ - private function getOwnerUser(): Identity - { - return empty($this->getShared()->getOwner()) - || empty($this->getShared()->getOwner()->getUser()) ? - throw new InvalidResponseException( - "Invalid owner information '" . print_r($this->getShared()->getOwner(), true) . "'" - ) : $this->getShared()->getOwner()->getUser(); - } - - /** - * @throws InvalidResponseException - */ - public function getOwnerName(): string - { - $ownerUser = $this->getOwnerUser(); - return empty($ownerUser->getDisplayName()) + $createdByUser = $this->getCreatedByUser(); + return empty($createdByUser->getDisplayName()) ? throw new InvalidResponseException( - "Invalid share owner name '" . print_r($ownerUser, true) . "'" + "Invalid share owner name '" . print_r($createdByUser, true) . "'" ) - : $ownerUser->getDisplayName(); + : $createdByUser->getDisplayName(); } /** * @throws InvalidResponseException */ - public function getOwnerId(): string + public function getCreatedByUserId(): string { - $ownerUser = $this->getOwnerUser(); - return empty($ownerUser->getId()) ? throw new InvalidResponseException( - "Invalid share owner id '" . print_r($ownerUser->getId(), true) . "'" - ) : $ownerUser->getId(); + $createdByUser = $this->getCreatedByUser(); + return empty($createdByUser->getId()) ? throw new InvalidResponseException( + "Invalid share owner id '" . print_r($createdByUser->getId(), true) . "'" + ) : $createdByUser->getId(); } /** - * gets the first permission of the remote item - * in theory there might be more that one permission, but currently there is no such case in ocis - * @return Permission + * @return Permission[] * @throws InvalidResponseException */ - private function getRemoteItemPermission() + public function getRemoteItemPermission() { $remoteItem = $this->getRemoteItem(); $permissions = $remoteItem->getPermissions(); - if ($permissions === null || sizeof($permissions) !== 1) { + if ($permissions === null) { throw new InvalidResponseException('Invalid permissions in remoteItem'); } - return $permissions[0]; + return $permissions; } /** @@ -273,22 +158,23 @@ private function getRemoteItemPermission() */ public function isUiHidden(): bool { - $uiHidden = $this->getRemoteItemPermission()->getAtUiHidden(); - if ($uiHidden === null) { - throw new InvalidResponseException('Invalid "@ui.hidden" parameter in permission'); + $uiHidden = $this->shareReceived->getAtUiHidden(); + if (is_bool($uiHidden)) { + return $uiHidden; } - return $uiHidden; + throw new InvalidResponseException('Invalid "@ui.hidden" parameter in permission'); } /** * @throws InvalidResponseException */ - public function isClientSyncronize(): bool + public function isClientSynchronized(): bool { - $clientSyncronize = $this->getRemoteItemPermission()->getAtClientSynchronize(); - if ($clientSyncronize === null) { - throw new InvalidResponseException('Invalid "@client.synchronize" parameter in permission'); + $clientSyncronize = $this->shareReceived->getAtClientSynchronize(); + if (is_bool($clientSyncronize)) { + return $clientSyncronize; } - return $clientSyncronize; + throw new InvalidResponseException('Invalid "@client.synchronize" parameter in permission'); + } }