array ( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', 'aliases' => array ( ), 'reference' => 'c1b3c813526def9ac207bd167c66963425acb315', 'name' => 'zoujingli/thinkadmin', ), 'versions' => array ( 'adbario/php-dot-notation' => array ( 'pretty_version' => '2.5.0', 'version' => '2.5.0.0', 'aliases' => array ( ), 'reference' => '081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae', ), 'alchemy/binary-driver' => array ( 'pretty_version' => 'v5.2.0', 'version' => '5.2.0.0', 'aliases' => array ( ), 'reference' => 'e0615cdff315e6b4b05ada67906df6262a020d22', ), 'alibabacloud/client' => array ( 'pretty_version' => '1.5.32', 'version' => '1.5.32.0', 'aliases' => array ( ), 'reference' => '5bc6f6d660797dcee2c3aef29700ab41ee764f4d', ), 'alibabacloud/cloudauth' => array ( 'pretty_version' => '1.8.958', 'version' => '1.8.958.0', 'aliases' => array ( ), 'reference' => '9e60abeb7b227da9d817714334247f61ba1aa3fe', ), 'alibabacloud/cloudauth-20190307' => array ( 'pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'aliases' => array ( ), 'reference' => '8507596ac64ddd478aed7db7dc845f32abf80839', ), 'alibabacloud/credentials' => array ( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array ( ), 'reference' => 'e79d4151ad8924c0cf79d4fe0ec151b8d7663a25', ), 'alibabacloud/darabonba-openapi' => array ( 'pretty_version' => '0.2.9', 'version' => '0.2.9.0', 'aliases' => array ( ), 'reference' => '4cdfc36615f345786d668dfbaf68d9a301b6dbe2', ), 'alibabacloud/endpoint-util' => array ( 'pretty_version' => '0.1.1', 'version' => '0.1.1.0', 'aliases' => array ( ), 'reference' => 'f3fe88a25d8df4faa3b0ae14ff202a9cc094e6c5', ), 'alibabacloud/gateway-spi' => array ( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array ( ), 'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb', ), 'alibabacloud/openapi-util' => array ( 'pretty_version' => '0.1.13', 'version' => '0.1.13.0', 'aliases' => array ( ), 'reference' => '870e59984f05e104aa303c85b8214e339ba0a0ac', ), 'alibabacloud/openplatform-20191219' => array ( 'pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'aliases' => array ( ), 'reference' => '8b3ee6ed5c388d71c27377b304fb5a6e5bd17fe4', ), 'alibabacloud/tea' => array ( 'pretty_version' => '3.2.0', 'version' => '3.2.0.0', 'aliases' => array ( ), 'reference' => 'f2bfe50b810f598e1a48e85ee94b7164049d5184', ), 'alibabacloud/tea-fileform' => array ( 'pretty_version' => '0.3.4', 'version' => '0.3.4.0', 'aliases' => array ( ), 'reference' => '4bf0c75a045c8115aa8cb1a394bd08d8bb833181', ), 'alibabacloud/tea-oss-sdk' => array ( 'pretty_version' => '0.3.5', 'version' => '0.3.5.0', 'aliases' => array ( ), 'reference' => '7f9c7ef0f6c05f3d6fb6b95195ba95d6929403e1', ), 'alibabacloud/tea-oss-utils' => array ( 'pretty_version' => '0.2.2', 'version' => '0.2.2.0', 'aliases' => array ( ), 'reference' => '42a218da7559a4352c9fc73640a71649484e9593', ), 'alibabacloud/tea-rpc' => array ( 'pretty_version' => '0.1.11', 'version' => '0.1.11.0', 'aliases' => array ( ), 'reference' => '35f0fda2c5fc1bde6ad4276f3e476dcc7bfdc5e8', ), 'alibabacloud/tea-rpc-utils' => array ( 'pretty_version' => '0.2.9', 'version' => '0.2.9.0', 'aliases' => array ( ), 'reference' => '8e7d3f8849ab08eae7cd75cbb7363f6040997c56', ), 'alibabacloud/tea-utils' => array ( 'pretty_version' => '0.2.17', 'version' => '0.2.17.0', 'aliases' => array ( ), 'reference' => 'dad2f3e1791998d573ef2d9ebad01e7e0f053866', ), 'alibabacloud/tea-xml' => array ( 'pretty_version' => '0.2.3', 'version' => '0.2.3.0', 'aliases' => array ( ), 'reference' => '4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b', ), 'clagiordano/weblibs-configmanager' => array ( 'pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'aliases' => array ( ), 'reference' => '5c8ebcc62782313b1278afe802b120d18c07a059', ), 'doctrine/annotations' => array ( 'pretty_version' => '1.14.3', 'version' => '1.14.3.0', 'aliases' => array ( ), 'reference' => 'fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af', ), 'doctrine/deprecations' => array ( 'pretty_version' => 'v1.0.0', 'version' => '1.0.0.0', 'aliases' => array ( ), 'reference' => '0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de', ), 'doctrine/lexer' => array ( 'pretty_version' => '2.1.0', 'version' => '2.1.0.0', 'aliases' => array ( ), 'reference' => '39ab8fcf5a51ce4b85ca97c7a7d033eb12831124', ), 'endroid/qr-code' => array ( 'pretty_version' => '1.9.3', 'version' => '1.9.3.0', 'aliases' => array ( ), 'reference' => 'c9644bec2a9cc9318e98d1437de3c628dcd1ef93', ), 'evenement/evenement' => array ( 'pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'aliases' => array ( ), 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', ), 'guzzlehttp/guzzle' => array ( 'pretty_version' => '7.5.0', 'version' => '7.5.0.0', 'aliases' => array ( ), 'reference' => 'b50a2a1251152e43f6a37f0fa053e730a67d25ba', ), 'guzzlehttp/promises' => array ( 'pretty_version' => '1.5.2', 'version' => '1.5.2.0', 'aliases' => array ( ), 'reference' => 'b94b2807d85443f9719887892882d0329d1e2598', ), 'guzzlehttp/psr7' => array ( 'pretty_version' => '2.4.3', 'version' => '2.4.3.0', 'aliases' => array ( ), 'reference' => '67c26b443f348a51926030c83481b85718457d3d', ), 'hg/apidoc-thinkphp' => array ( 'pretty_version' => 'v3.1.9', 'version' => '3.1.9.0', 'aliases' => array ( ), 'reference' => '877ff07f80d75444b20f0f252e0e5f67e82f6eb1', ), 'lizhichao/one-sm' => array ( 'pretty_version' => '1.10', 'version' => '1.10.0.0', 'aliases' => array ( ), 'reference' => '687a012a44a5bfd4d9143a0234e1060543be455a', ), 'monolog/monolog' => array ( 'pretty_version' => '2.9.1', 'version' => '2.9.1.0', 'aliases' => array ( ), 'reference' => 'f259e2b15fb95494c83f52d3caad003bbf5ffaa1', ), 'mtdowling/jmespath.php' => array ( 'pretty_version' => '2.6.1', 'version' => '2.6.1.0', 'aliases' => array ( ), 'reference' => '9b87907a81b87bc76d19a7fb2d61e61486ee9edb', ), 'nesbot/carbon' => array ( 'pretty_version' => '2.66.0', 'version' => '2.66.0.0', 'aliases' => array ( ), 'reference' => '496712849902241f04902033b0441b269effe001', ), 'neutron/temporary-filesystem' => array ( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', 'aliases' => array ( ), 'reference' => '55f3d4896eff3bf070e491916e6c564db5e640b5', ), 'php-ffmpeg/php-ffmpeg' => array ( 'pretty_version' => 'v0.19.0', 'version' => '0.19.0.0', 'aliases' => array ( ), 'reference' => '22b71931fd1a97207788636b283eee1c0067eff7', ), 'psr/cache' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', ), 'psr/cache-implementation' => array ( 'provided' => array ( 0 => '1.0|2.0', ), ), 'psr/container' => array ( 'pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'aliases' => array ( ), 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', ), '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' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', ), 'psr/http-client-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/http-factory' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be', ), 'psr/http-factory-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/http-message' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', ), 'psr/http-message-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/log' => array ( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array ( ), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', ), 'psr/log-implementation' => array ( 'provided' => array ( 0 => '1.0.0 || 2.0.0 || 3.0.0', ), ), 'psr/simple-cache' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', ), 'psr/simple-cache-implementation' => array ( 'provided' => array ( 0 => '1.0|2.0', ), ), 'ralouphie/getallheaders' => array ( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array ( ), 'reference' => '120b605dfeb996808c31b6477290a714d356e822', ), 'ralouphie/mimey' => array ( 'pretty_version' => '2.1.0', 'version' => '2.1.0.0', 'aliases' => array ( ), 'reference' => '8f74e6da73f9df7bd965e4e123f3d8fb9acb89ba', ), 'symfony/cache' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => 'e9147c89fdfdc5d5ef798bb7193f23726ad609f5', ), 'symfony/cache-contracts' => array ( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array ( ), 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', ), 'symfony/cache-implementation' => array ( 'provided' => array ( 0 => '1.0|2.0', ), ), 'symfony/class-loader' => array ( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', 'aliases' => array ( ), 'reference' => 'a22265a9f3511c0212bf79f54910ca5a77c0e92c', ), 'symfony/css-selector' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => 'f4a7d150f5b9e8f974f6f127d8167e420d11fc62', ), 'symfony/deprecation-contracts' => array ( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array ( ), 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', ), 'symfony/event-dispatcher' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => 'abf49cc084c087d94b4cb939c3f3672971784e0c', ), 'symfony/event-dispatcher-contracts' => array ( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array ( ), 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', ), 'symfony/event-dispatcher-implementation' => array ( 'provided' => array ( 0 => '2.0', ), ), 'symfony/filesystem' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => '648bfaca6a494f3e22378123bcee2894045dc9d8', ), 'symfony/http-foundation' => array ( 'pretty_version' => 'v5.4.20', 'version' => '5.4.20.0', 'aliases' => array ( ), 'reference' => 'd0435363362a47c14e9cf50663cb8ffbf491875a', ), 'symfony/options-resolver' => array ( 'pretty_version' => 'v3.4.47', 'version' => '3.4.47.0', 'aliases' => array ( ), 'reference' => 'c7efc97a47b2ebaabc19d5b6c6b50f5c37c92744', ), 'symfony/polyfill-ctype' => array ( 'pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'aliases' => array ( ), 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a', ), 'symfony/polyfill-mbstring' => array ( 'pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'aliases' => array ( ), 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', ), 'symfony/polyfill-php73' => array ( 'pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'aliases' => array ( ), 'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9', ), 'symfony/polyfill-php80' => array ( 'pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'aliases' => array ( ), 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936', ), 'symfony/process' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => 'c5ba874c9b636dbccf761e22ce750e88ec3f55e1', ), 'symfony/service-contracts' => array ( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array ( ), 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c', ), 'symfony/translation' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => '83d487b13b7fb4c0a6ad079f4e4c9b4525e1b695', ), 'symfony/translation-contracts' => array ( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array ( ), 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', ), 'symfony/translation-implementation' => array ( 'provided' => array ( 0 => '2.3', ), ), 'symfony/var-exporter' => array ( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', 'aliases' => array ( ), 'reference' => '2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6', ), 'topthink/framework' => array ( 'pretty_version' => 'v6.1.1', 'version' => '6.1.1.0', 'aliases' => array ( ), 'reference' => '2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210', ), 'topthink/think-helper' => array ( 'pretty_version' => 'v3.1.6', 'version' => '3.1.6.0', 'aliases' => array ( ), 'reference' => '769acbe50a4274327162f9c68ec2e89a38eb2aff', ), 'topthink/think-migration' => array ( 'pretty_version' => 'v3.0.4', 'version' => '3.0.4.0', 'aliases' => array ( ), 'reference' => 'c5880669b277762d5ff935e551bc0d5c71de6811', ), 'topthink/think-orm' => array ( 'pretty_version' => 'v2.0.56', 'version' => '2.0.56.0', 'aliases' => array ( ), 'reference' => '75b8512736daaa056d511f42c15bed87c9f3605a', ), 'topthink/think-template' => array ( 'pretty_version' => 'v2.0.8', 'version' => '2.0.8.0', 'aliases' => array ( ), 'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368', ), 'topthink/think-view' => array ( 'pretty_version' => 'v1.0.14', 'version' => '1.0.14.0', 'aliases' => array ( ), 'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d', ), 'voku/simple_html_dom' => array ( 'pretty_version' => '4.8.7', 'version' => '4.8.7.0', 'aliases' => array ( ), 'reference' => 'd9807c2b6124457eee2c30b3d1c067e0657713d4', ), 'yansongda/pay' => array ( 'pretty_version' => 'v2.10.5', 'version' => '2.10.5.0', 'aliases' => array ( ), 'reference' => 'f7d93ed784de4ca09d3386d28139c724ddd526fc', ), 'yansongda/supports' => array ( 'pretty_version' => 'v2.2.0', 'version' => '2.2.0.0', 'aliases' => array ( ), 'reference' => 'de9a8d38b0461ddf9c12f27390dad9a40c9b4e3b', ), 'zoujingli/ip2region' => array ( 'pretty_version' => 'v2.0.1', 'version' => '2.0.1.0', 'aliases' => array ( ), 'reference' => 'b377b1d9181a891b60027e4289efb61bca1d369e', ), 'zoujingli/think-library' => array ( 'pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'aliases' => array ( ), 'reference' => 'f77960dd0912fa5127a43a4e5d77f7e151d2554d', ), 'zoujingli/thinkadmin' => array ( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', 'aliases' => array ( ), 'reference' => 'c1b3c813526def9ac207bd167c66963425acb315', ), 'zoujingli/wechat-developer' => array ( 'pretty_version' => 'v1.2.37', 'version' => '1.2.37.0', 'aliases' => array ( ), 'reference' => '1d453606d3f0f9626a6da7ba82c7b777265558f9', ), ), ); private static $canGetVendors; private static $installedByVendor = array(); 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))); } public static function isInstalled($packageName) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return true; } } return false; } public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } 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'); } 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'); } 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'); } 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'); } public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } public static function getRawData() { @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); return self::$installed; } public static function getAllRawData() { return self::getInstalled(); } public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); } private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); if (self::$canGetVendors) { 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; } }