Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/EmailNotifications/vendor/composer/InstalledVersions.php
Ðазад
<?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; /** * This class is copied in every Composer installed project and available to all * * To require it's presence, you can require `composer-runtime-api ^2.0` */ class InstalledVersions { private static $installed = array ( 'root' => array ( 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', 'aliases' => array ( ), 'reference' => NULL, 'name' => '__root__', ), 'versions' => array ( '__root__' => array ( 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', 'aliases' => array ( ), 'reference' => NULL, ), 'async-aws/core' => array ( 'pretty_version' => '1.23.0', 'version' => '1.23.0.0', 'aliases' => array ( ), 'reference' => 'f2f40b895f1b2834a793c78d6c1ff8e1a1c39a12', ), 'async-aws/ses' => array ( 'pretty_version' => '1.9.0', 'version' => '1.9.0.0', 'aliases' => array ( ), 'reference' => '55227c6d0c6485410c0e5bc9b6a42d44b2e10d80', ), 'doctrine/lexer' => array ( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', 'aliases' => array ( ), 'reference' => '31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd', ), 'dragonmantank/cron-expression' => array ( 'pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'aliases' => array ( ), 'reference' => '8c784d071debd117328803d86b2097615b457500', ), 'egulias/email-validator' => array ( 'pretty_version' => '4.0.2', 'version' => '4.0.2.0', 'aliases' => array ( ), 'reference' => 'ebaaf5be6c0286928352e054f2d5125608e5405e', ), 'html2text/html2text' => array ( 'pretty_version' => '4.3.2', 'version' => '4.3.2.0', 'aliases' => array ( ), 'reference' => '3b443cbe302b52eb5806a21a9dbd79524203970a', ), 'mtdowling/cron-expression' => array ( 'replaced' => array ( 0 => '^1.0', ), ), 'php-http/async-client-implementation' => array ( 'provided' => array ( 0 => '*', ), ), 'php-http/client-implementation' => array ( 'provided' => array ( 0 => '*', ), ), 'psr/cache' => array ( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'aliases' => array ( ), 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', ), 'psr/container' => array ( 'pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'aliases' => array ( ), 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', ), 'psr/event-dispatcher' => array ( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array ( ), 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', ), 'psr/event-dispatcher-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/http-client-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/log' => array ( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array ( ), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', ), 'symfony/amazon-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => '15ed346d084a912d86f4976407f567507726a846', ), 'symfony/deprecation-contracts' => array ( 'pretty_version' => 'v3.5.1', 'version' => '3.5.1.0', 'aliases' => array ( ), 'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', ), 'symfony/event-dispatcher' => array ( 'pretty_version' => 'v6.4.13', 'version' => '6.4.13.0', 'aliases' => array ( ), 'reference' => '0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e', ), 'symfony/event-dispatcher-contracts' => array ( 'pretty_version' => 'v3.5.1', 'version' => '3.5.1.0', 'aliases' => array ( ), 'reference' => '7642f5e970b672283b7823222ae8ef8bbc160b9f', ), 'symfony/event-dispatcher-implementation' => array ( 'provided' => array ( 0 => '2.0|3.0', ), ), 'symfony/google-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => 'd49cb1463a6e9f45a2f1fd901ede8869d142f76d', ), 'symfony/http-client' => array ( 'pretty_version' => 'v7.2.1', 'version' => '7.2.1.0', 'aliases' => array ( ), 'reference' => 'ff4df2b68d1c67abb9fef146e6540ea16b58d99e', ), 'symfony/http-client-contracts' => array ( 'pretty_version' => 'v3.5.2', 'version' => '3.5.2.0', 'aliases' => array ( ), 'reference' => 'ee8d807ab20fcb51267fdace50fbe3494c31e645', ), 'symfony/http-client-implementation' => array ( 'provided' => array ( 0 => '3.0', ), ), 'symfony/mailchimp-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => 'ba33b405ec5e7e99a6573e9e2d5030eb5ada92e8', ), 'symfony/mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => 'f732e1fafdf0f4a2d865e91f1018aaca174aeed9', ), 'symfony/mailgun-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => '87cf2ffa43061d98008a2a738721ee9d32c2b489', ), 'symfony/mailjet-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => 'b1802870504d78250c36dcd635134534d01606db', ), 'symfony/mime' => array ( 'pretty_version' => 'v6.4.13', 'version' => '6.4.13.0', 'aliases' => array ( ), 'reference' => '1de1cf14d99b12c7ebbb850491ec6ae3ed468855', ), 'symfony/oh-my-smtp-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => '5c268811d8a62cee2d487d9ec8fd2825f564e069', ), 'symfony/polyfill-intl-idn' => array ( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'aliases' => array ( ), 'reference' => 'c36586dcf89a12315939e00ec9b4474adcb1d773', ), 'symfony/polyfill-intl-normalizer' => array ( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'aliases' => array ( ), 'reference' => '3833d7255cc303546435cb650316bff708a1c75c', ), 'symfony/polyfill-mbstring' => array ( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'aliases' => array ( ), 'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341', ), 'symfony/polyfill-php80' => array ( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'aliases' => array ( ), 'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8', ), 'symfony/postmark-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => '8210543c21dd2d40d6f8d7c09531ec1bc17efc23', ), 'symfony/sendgrid-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => '27dc034c6322731cff5c59676a27d3a7d105f8b7', ), 'symfony/sendinblue-mailer' => array ( 'pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'aliases' => array ( ), 'reference' => 'c286e609c02c82716118187954c4258489f1d185', ), 'symfony/service-contracts' => array ( 'pretty_version' => 'v3.5.1', 'version' => '3.5.1.0', 'aliases' => array ( ), 'reference' => 'e53260aabf78fb3d63f8d79d69ece59f80d5eda0', ), 'webmozart/assert' => array ( 'pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'aliases' => array ( ), 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', ), ), ); private static $canGetVendors; private static $installedByVendor = array(); /** * Returns a list of all package names which are present, either by being installed, replaced or provided * * @return string[] * @psalm-return list<string> */ public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); } /** * Checks whether the given package is installed * * This also returns true if the package name is provided or replaced by another package * * @param string $packageName * @return bool */ public static function isInstalled($packageName) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return true; } } return false; } /** * Checks whether the given package satisfies a version constraint * * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: * * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') * * @param VersionParser $parser Install composer/semver to have access to this class and functionality * @param string $packageName * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package * * @return bool */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } /** * Returns a version constraint representing all the range(s) which are installed for a given package * * It is easier to use this via isInstalled() with the $constraint argument if you need to check * whether a given version of a package is installed, and not just whether it exists * * @param string $packageName * @return string Version constraint usable with composer/semver */ public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference */ public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @return array * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]} */ public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } /** * Returns the raw installed.php data for custom implementations * * @return array[] * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} */ public static function getRawData() { return self::$installed; } /** * Lets you reload the static array from another file * * This is only useful for complex integrations in which a project needs to use * this class but then also needs to execute another project's autoloader in process, * and wants to ensure both projects have access to their version of installed.php. * * A typical case would be PHPUnit, where it would need to make sure it reads all * the data it needs from this class, then call reload() with * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure * the project in which it runs can then also use this class safely, without * interference between PHPUnit's dependencies and the project's dependencies. * * @param array[] $data A vendor/composer/installed.php data set * @return void * * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data */ public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); } /** * @return array[] */ private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); if (self::$canGetVendors) { // @phpstan-ignore-next-line foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 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'; } } } $installed[] = self::$installed; return $installed; } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка