InstalledVersions.php 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486
  1. <?php
  2. namespace Composer;
  3. use Composer\Autoload\ClassLoader;
  4. use Composer\Semver\VersionParser;
  5. class InstalledVersions
  6. {
  7. private static $installed = array (
  8. 'root' =>
  9. array (
  10. 'pretty_version' => '1.0.0+no-version-set',
  11. 'version' => '1.0.0.0',
  12. 'aliases' =>
  13. array (
  14. ),
  15. 'reference' => NULL,
  16. 'name' => 'hyperf/hyperf-skeleton',
  17. ),
  18. 'versions' =>
  19. array (
  20. 'comely-io/data-types' =>
  21. array (
  22. 'pretty_version' => '1.0.34',
  23. 'version' => '1.0.34.0',
  24. 'aliases' =>
  25. array (
  26. ),
  27. 'reference' => '833ecf364a99aa5cd161e0ebd1191860921834c6',
  28. ),
  29. 'composer/pcre' =>
  30. array (
  31. 'pretty_version' => '3.1.0',
  32. 'version' => '3.1.0.0',
  33. 'aliases' =>
  34. array (
  35. ),
  36. 'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2',
  37. ),
  38. 'composer/semver' =>
  39. array (
  40. 'pretty_version' => '3.3.2',
  41. 'version' => '3.3.2.0',
  42. 'aliases' =>
  43. array (
  44. ),
  45. 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9',
  46. ),
  47. 'composer/xdebug-handler' =>
  48. array (
  49. 'pretty_version' => '3.0.3',
  50. 'version' => '3.0.3.0',
  51. 'aliases' =>
  52. array (
  53. ),
  54. 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c',
  55. ),
  56. 'cordoval/hamcrest-php' =>
  57. array (
  58. 'replaced' =>
  59. array (
  60. 0 => '*',
  61. ),
  62. ),
  63. 'davedevelopment/hamcrest-php' =>
  64. array (
  65. 'replaced' =>
  66. array (
  67. 0 => '*',
  68. ),
  69. ),
  70. 'doctrine/annotations' =>
  71. array (
  72. 'pretty_version' => '1.14.3',
  73. 'version' => '1.14.3.0',
  74. 'aliases' =>
  75. array (
  76. ),
  77. 'reference' => 'fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af',
  78. ),
  79. 'doctrine/deprecations' =>
  80. array (
  81. 'pretty_version' => 'v1.1.1',
  82. 'version' => '1.1.1.0',
  83. 'aliases' =>
  84. array (
  85. ),
  86. 'reference' => '612a3ee5ab0d5dd97b7cf3874a6efe24325efac3',
  87. ),
  88. 'doctrine/inflector' =>
  89. array (
  90. 'pretty_version' => '2.0.8',
  91. 'version' => '2.0.8.0',
  92. 'aliases' =>
  93. array (
  94. ),
  95. 'reference' => 'f9301a5b2fb1216b2b08f02ba04dc45423db6bff',
  96. ),
  97. 'doctrine/instantiator' =>
  98. array (
  99. 'pretty_version' => '1.5.0',
  100. 'version' => '1.5.0.0',
  101. 'aliases' =>
  102. array (
  103. ),
  104. 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b',
  105. ),
  106. 'doctrine/lexer' =>
  107. array (
  108. 'pretty_version' => '2.1.0',
  109. 'version' => '2.1.0.0',
  110. 'aliases' =>
  111. array (
  112. ),
  113. 'reference' => '39ab8fcf5a51ce4b85ca97c7a7d033eb12831124',
  114. ),
  115. 'fgrosse/phpasn1' =>
  116. array (
  117. 'pretty_version' => 'v2.5.0',
  118. 'version' => '2.5.0.0',
  119. 'aliases' =>
  120. array (
  121. ),
  122. 'reference' => '42060ed45344789fb9f21f9f1864fc47b9e3507b',
  123. ),
  124. 'fig/http-message-util' =>
  125. array (
  126. 'pretty_version' => '1.1.5',
  127. 'version' => '1.1.5.0',
  128. 'aliases' =>
  129. array (
  130. ),
  131. 'reference' => '9d94dc0154230ac39e5bf89398b324a86f63f765',
  132. ),
  133. 'friendsofphp/php-cs-fixer' =>
  134. array (
  135. 'pretty_version' => 'v3.14.2',
  136. 'version' => '3.14.2.0',
  137. 'aliases' =>
  138. array (
  139. ),
  140. 'reference' => '14f0541651841b63640e7aafad041ad55dc7aa88',
  141. ),
  142. 'graham-campbell/result-type' =>
  143. array (
  144. 'pretty_version' => 'v1.1.1',
  145. 'version' => '1.1.1.0',
  146. 'aliases' =>
  147. array (
  148. ),
  149. 'reference' => '672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831',
  150. ),
  151. 'guzzlehttp/guzzle' =>
  152. array (
  153. 'pretty_version' => '7.7.0',
  154. 'version' => '7.7.0.0',
  155. 'aliases' =>
  156. array (
  157. ),
  158. 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5',
  159. ),
  160. 'guzzlehttp/promises' =>
  161. array (
  162. 'pretty_version' => '2.0.0',
  163. 'version' => '2.0.0.0',
  164. 'aliases' =>
  165. array (
  166. ),
  167. 'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6',
  168. ),
  169. 'guzzlehttp/psr7' =>
  170. array (
  171. 'pretty_version' => '2.5.0',
  172. 'version' => '2.5.0.0',
  173. 'aliases' =>
  174. array (
  175. ),
  176. 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6',
  177. ),
  178. 'hamcrest/hamcrest-php' =>
  179. array (
  180. 'pretty_version' => 'v2.0.1',
  181. 'version' => '2.0.1.0',
  182. 'aliases' =>
  183. array (
  184. ),
  185. 'reference' => '8c3d0a3f6af734494ad8f6fbbee0ba92422859f3',
  186. ),
  187. 'hyperf/cache' =>
  188. array (
  189. 'pretty_version' => 'v2.2.40',
  190. 'version' => '2.2.40.0',
  191. 'aliases' =>
  192. array (
  193. ),
  194. 'reference' => '118ca172828d51f5eea6e3d654df6275705ddeef',
  195. ),
  196. 'hyperf/command' =>
  197. array (
  198. 'pretty_version' => 'v2.2.35',
  199. 'version' => '2.2.35.0',
  200. 'aliases' =>
  201. array (
  202. ),
  203. 'reference' => '48cd9789166ecf5f3009de45bcf128b997ec5f88',
  204. ),
  205. 'hyperf/config' =>
  206. array (
  207. 'pretty_version' => 'v2.2.33',
  208. 'version' => '2.2.33.0',
  209. 'aliases' =>
  210. array (
  211. ),
  212. 'reference' => '9437f45aea36358840c907691e9b28492550e9a3',
  213. ),
  214. 'hyperf/context' =>
  215. array (
  216. 'pretty_version' => 'v2.2.33',
  217. 'version' => '2.2.33.0',
  218. 'aliases' =>
  219. array (
  220. ),
  221. 'reference' => 'f2e77442693a07d47f7ca97f8b2fdb8e17196a47',
  222. ),
  223. 'hyperf/contract' =>
  224. array (
  225. 'pretty_version' => 'v2.2.33',
  226. 'version' => '2.2.33.0',
  227. 'aliases' =>
  228. array (
  229. ),
  230. 'reference' => '1ebf037c91d76ec05af9e5cb3335b0f5ec810e27',
  231. ),
  232. 'hyperf/crontab' =>
  233. array (
  234. 'pretty_version' => 'v2.2.33',
  235. 'version' => '2.2.33.0',
  236. 'aliases' =>
  237. array (
  238. ),
  239. 'reference' => '64e1a6db961fdf46a111ec172956abb5a386511c',
  240. ),
  241. 'hyperf/database' =>
  242. array (
  243. 'pretty_version' => 'v2.2.39',
  244. 'version' => '2.2.39.0',
  245. 'aliases' =>
  246. array (
  247. ),
  248. 'reference' => '6105b9539aa4db7d615b2fef2687655a7a5df56c',
  249. ),
  250. 'hyperf/db-connection' =>
  251. array (
  252. 'pretty_version' => 'v2.2.33',
  253. 'version' => '2.2.33.0',
  254. 'aliases' =>
  255. array (
  256. ),
  257. 'reference' => '05d2a1e858f01682739e066430b339a9bcdef837',
  258. ),
  259. 'hyperf/devtool' =>
  260. array (
  261. 'pretty_version' => 'v2.2.33',
  262. 'version' => '2.2.33.0',
  263. 'aliases' =>
  264. array (
  265. ),
  266. 'reference' => 'f447311bf7507ff2b13658250ef3bcff7a9bc881',
  267. ),
  268. 'hyperf/di' =>
  269. array (
  270. 'pretty_version' => 'v2.2.33',
  271. 'version' => '2.2.33.0',
  272. 'aliases' =>
  273. array (
  274. ),
  275. 'reference' => '471c3cf9e0c02ab3aaa0c6e9884062bd541e4577',
  276. ),
  277. 'hyperf/dispatcher' =>
  278. array (
  279. 'pretty_version' => 'v2.2.33',
  280. 'version' => '2.2.33.0',
  281. 'aliases' =>
  282. array (
  283. ),
  284. 'reference' => 'bcffa8faa11367204c4e00e93f6425d600603e03',
  285. ),
  286. 'hyperf/engine' =>
  287. array (
  288. 'pretty_version' => 'v1.2.2',
  289. 'version' => '1.2.2.0',
  290. 'aliases' =>
  291. array (
  292. ),
  293. 'reference' => '12fdb2b4cec9ee92fc808321a7378cc6251e52cd',
  294. ),
  295. 'hyperf/event' =>
  296. array (
  297. 'pretty_version' => 'v2.2.33',
  298. 'version' => '2.2.33.0',
  299. 'aliases' =>
  300. array (
  301. ),
  302. 'reference' => 'cd92f5c1218c65f29b15c4d12dcf5835e0426ac8',
  303. ),
  304. 'hyperf/exception-handler' =>
  305. array (
  306. 'pretty_version' => 'v2.2.33',
  307. 'version' => '2.2.33.0',
  308. 'aliases' =>
  309. array (
  310. ),
  311. 'reference' => '4ec8f6debf530b661bb2b436ef96da53ce0abbdc',
  312. ),
  313. 'hyperf/framework' =>
  314. array (
  315. 'pretty_version' => 'v2.2.33',
  316. 'version' => '2.2.33.0',
  317. 'aliases' =>
  318. array (
  319. ),
  320. 'reference' => '49e98fb747214bcac79aecadda8349e70b8f2891',
  321. ),
  322. 'hyperf/guzzle' =>
  323. array (
  324. 'pretty_version' => 'v2.2.33',
  325. 'version' => '2.2.33.0',
  326. 'aliases' =>
  327. array (
  328. ),
  329. 'reference' => 'ef4d6b02778cf44b7f0edefd9c33a5d8d08ad48f',
  330. ),
  331. 'hyperf/http-message' =>
  332. array (
  333. 'pretty_version' => 'v2.2.33',
  334. 'version' => '2.2.33.0',
  335. 'aliases' =>
  336. array (
  337. ),
  338. 'reference' => 'd71d796177ec72fe30d116c57ed8bd8121a57b6e',
  339. ),
  340. 'hyperf/http-server' =>
  341. array (
  342. 'pretty_version' => 'v2.2.33',
  343. 'version' => '2.2.33.0',
  344. 'aliases' =>
  345. array (
  346. ),
  347. 'reference' => '0f1f22d408de82c9f8fb3f2cf57457e319210798',
  348. ),
  349. 'hyperf/hyperf-skeleton' =>
  350. array (
  351. 'pretty_version' => '1.0.0+no-version-set',
  352. 'version' => '1.0.0.0',
  353. 'aliases' =>
  354. array (
  355. ),
  356. 'reference' => NULL,
  357. ),
  358. 'hyperf/ide-helper' =>
  359. array (
  360. 'pretty_version' => 'v2.2.33',
  361. 'version' => '2.2.33.0',
  362. 'aliases' =>
  363. array (
  364. ),
  365. 'reference' => 'e7e26af552f7cf5512c357df9604ff9aa77ed3f3',
  366. ),
  367. 'hyperf/logger' =>
  368. array (
  369. 'pretty_version' => 'v2.2.33',
  370. 'version' => '2.2.33.0',
  371. 'aliases' =>
  372. array (
  373. ),
  374. 'reference' => 'f19929efaeca4aba2b91e7452f4f1b3245bfac51',
  375. ),
  376. 'hyperf/macroable' =>
  377. array (
  378. 'pretty_version' => 'v2.2.33',
  379. 'version' => '2.2.33.0',
  380. 'aliases' =>
  381. array (
  382. ),
  383. 'reference' => 'e4e1b3ed614a5a9d4c24a48b0b3a554eb712af9f',
  384. ),
  385. 'hyperf/memory' =>
  386. array (
  387. 'pretty_version' => 'v2.2.33',
  388. 'version' => '2.2.33.0',
  389. 'aliases' =>
  390. array (
  391. ),
  392. 'reference' => '8adfac46a0f52385a4ad2e8bc4f956c34cb6f25e',
  393. ),
  394. 'hyperf/model-listener' =>
  395. array (
  396. 'pretty_version' => 'v2.2.33',
  397. 'version' => '2.2.33.0',
  398. 'aliases' =>
  399. array (
  400. ),
  401. 'reference' => '0ac64b517db0d9e192650cd70f81a2962cd54e63',
  402. ),
  403. 'hyperf/pool' =>
  404. array (
  405. 'pretty_version' => 'v2.2.33',
  406. 'version' => '2.2.33.0',
  407. 'aliases' =>
  408. array (
  409. ),
  410. 'reference' => 'b66965453f404f09570a166e9c103a074d2dbd4e',
  411. ),
  412. 'hyperf/process' =>
  413. array (
  414. 'pretty_version' => 'v2.2.33',
  415. 'version' => '2.2.33.0',
  416. 'aliases' =>
  417. array (
  418. ),
  419. 'reference' => 'a93b2a4bf0455e3f639649046705e7b3b6ccd137',
  420. ),
  421. 'hyperf/redis' =>
  422. array (
  423. 'pretty_version' => 'v2.2.37',
  424. 'version' => '2.2.37.0',
  425. 'aliases' =>
  426. array (
  427. ),
  428. 'reference' => '89f6c0063c69dc27adb094277947af30d2e59ad0',
  429. ),
  430. 'hyperf/server' =>
  431. array (
  432. 'pretty_version' => 'v2.2.33',
  433. 'version' => '2.2.33.0',
  434. 'aliases' =>
  435. array (
  436. ),
  437. 'reference' => '1d3364520e37777a7ed83d8bc1597da42f8d6c1b',
  438. ),
  439. 'hyperf/testing' =>
  440. array (
  441. 'pretty_version' => 'v2.2.33',
  442. 'version' => '2.2.33.0',
  443. 'aliases' =>
  444. array (
  445. ),
  446. 'reference' => '63726e3b4e999a96dd4dd62a54f8b2f8f48f850e',
  447. ),
  448. 'hyperf/utils' =>
  449. array (
  450. 'pretty_version' => 'v2.2.34',
  451. 'version' => '2.2.34.0',
  452. 'aliases' =>
  453. array (
  454. ),
  455. 'reference' => '9c8519392166a6c8057cc52f7d02e1ac638581f5',
  456. ),
  457. 'iexbase/tron-api' =>
  458. array (
  459. 'pretty_version' => '4.0.1',
  460. 'version' => '4.0.1.0',
  461. 'aliases' =>
  462. array (
  463. ),
  464. 'reference' => '366227f946f7b8030db8e7326c6f9573c3898583',
  465. ),
  466. 'iexbase/web3.php' =>
  467. array (
  468. 'pretty_version' => '2.0.1',
  469. 'version' => '2.0.1.0',
  470. 'aliases' =>
  471. array (
  472. ),
  473. 'reference' => 'f25ed954a7586ead86046dd7e02a333a8098511b',
  474. ),
  475. 'kodova/hamcrest-php' =>
  476. array (
  477. 'replaced' =>
  478. array (
  479. 0 => '*',
  480. ),
  481. ),
  482. 'kornrunner/keccak' =>
  483. array (
  484. 'pretty_version' => '1.1.0',
  485. 'version' => '1.1.0.0',
  486. 'aliases' =>
  487. array (
  488. ),
  489. 'reference' => '433749d28e117fb97baf9f2631b92b5d9ab3c890',
  490. ),
  491. 'kornrunner/secp256k1' =>
  492. array (
  493. 'pretty_version' => '0.1.2',
  494. 'version' => '0.1.2.0',
  495. 'aliases' =>
  496. array (
  497. ),
  498. 'reference' => '915f0ef1ec748606a1117b171093266de349b058',
  499. ),
  500. 'laminas/laminas-mime' =>
  501. array (
  502. 'pretty_version' => '2.10.0',
  503. 'version' => '2.10.0.0',
  504. 'aliases' =>
  505. array (
  506. ),
  507. 'reference' => '62a899a7c9100889c2d2386b1357003a2cb52fa9',
  508. ),
  509. 'laminas/laminas-stdlib' =>
  510. array (
  511. 'pretty_version' => '3.13.0',
  512. 'version' => '3.13.0.0',
  513. 'aliases' =>
  514. array (
  515. ),
  516. 'reference' => '66a6d03c381f6c9f1dd988bf8244f9afb9380d76',
  517. ),
  518. 'mdanter/ecc' =>
  519. array (
  520. 'pretty_version' => 'v0.5.2',
  521. 'version' => '0.5.2.0',
  522. 'aliases' =>
  523. array (
  524. ),
  525. 'reference' => 'b95f25cc1bacc83a9f0ccd375900b7cfd343029e',
  526. ),
  527. 'mockery/mockery' =>
  528. array (
  529. 'pretty_version' => '1.6.2',
  530. 'version' => '1.6.2.0',
  531. 'aliases' =>
  532. array (
  533. ),
  534. 'reference' => '13a7fa2642c76c58fa2806ef7f565344c817a191',
  535. ),
  536. 'monolog/monolog' =>
  537. array (
  538. 'pretty_version' => '2.5.0',
  539. 'version' => '2.5.0.0',
  540. 'aliases' =>
  541. array (
  542. ),
  543. 'reference' => '4192345e260f1d51b365536199744b987e160edc',
  544. ),
  545. 'myclabs/deep-copy' =>
  546. array (
  547. 'pretty_version' => '1.11.1',
  548. 'version' => '1.11.1.0',
  549. 'aliases' =>
  550. array (
  551. ),
  552. 'reference' => '7284c22080590fb39f2ffa3e9057f10a4ddd0e0c',
  553. ),
  554. 'nesbot/carbon' =>
  555. array (
  556. 'pretty_version' => '2.68.1',
  557. 'version' => '2.68.1.0',
  558. 'aliases' =>
  559. array (
  560. ),
  561. 'reference' => '4f991ed2a403c85efbc4f23eb4030063fdbe01da',
  562. ),
  563. 'nikic/fast-route' =>
  564. array (
  565. 'pretty_version' => 'v1.3.0',
  566. 'version' => '1.3.0.0',
  567. 'aliases' =>
  568. array (
  569. ),
  570. 'reference' => '181d480e08d9476e61381e04a71b34dc0432e812',
  571. ),
  572. 'nikic/php-parser' =>
  573. array (
  574. 'pretty_version' => 'v4.16.0',
  575. 'version' => '4.16.0.0',
  576. 'aliases' =>
  577. array (
  578. ),
  579. 'reference' => '19526a33fb561ef417e822e85f08a00db4059c17',
  580. ),
  581. 'phar-io/manifest' =>
  582. array (
  583. 'pretty_version' => '2.0.3',
  584. 'version' => '2.0.3.0',
  585. 'aliases' =>
  586. array (
  587. ),
  588. 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
  589. ),
  590. 'phar-io/version' =>
  591. array (
  592. 'pretty_version' => '3.2.1',
  593. 'version' => '3.2.1.0',
  594. 'aliases' =>
  595. array (
  596. ),
  597. 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
  598. ),
  599. 'php-di/phpdoc-reader' =>
  600. array (
  601. 'pretty_version' => '2.2.1',
  602. 'version' => '2.2.1.0',
  603. 'aliases' =>
  604. array (
  605. ),
  606. 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c',
  607. ),
  608. 'phpoption/phpoption' =>
  609. array (
  610. 'pretty_version' => '1.9.1',
  611. 'version' => '1.9.1.0',
  612. 'aliases' =>
  613. array (
  614. ),
  615. 'reference' => 'dd3a383e599f49777d8b628dadbb90cae435b87e',
  616. ),
  617. 'phpseclib/phpseclib' =>
  618. array (
  619. 'pretty_version' => '2.0.44',
  620. 'version' => '2.0.44.0',
  621. 'aliases' =>
  622. array (
  623. ),
  624. 'reference' => '149f608243f8133c61926aae26ce67d2b22b37e5',
  625. ),
  626. 'phpstan/phpstan' =>
  627. array (
  628. 'pretty_version' => '0.12.100',
  629. 'version' => '0.12.100.0',
  630. 'aliases' =>
  631. array (
  632. ),
  633. 'reference' => '48236ddf823547081b2b153d1cd2994b784328c3',
  634. ),
  635. 'phpunit/php-code-coverage' =>
  636. array (
  637. 'pretty_version' => '9.2.26',
  638. 'version' => '9.2.26.0',
  639. 'aliases' =>
  640. array (
  641. ),
  642. 'reference' => '443bc6912c9bd5b409254a40f4b0f4ced7c80ea1',
  643. ),
  644. 'phpunit/php-file-iterator' =>
  645. array (
  646. 'pretty_version' => '3.0.6',
  647. 'version' => '3.0.6.0',
  648. 'aliases' =>
  649. array (
  650. ),
  651. 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
  652. ),
  653. 'phpunit/php-invoker' =>
  654. array (
  655. 'pretty_version' => '3.1.1',
  656. 'version' => '3.1.1.0',
  657. 'aliases' =>
  658. array (
  659. ),
  660. 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
  661. ),
  662. 'phpunit/php-text-template' =>
  663. array (
  664. 'pretty_version' => '2.0.4',
  665. 'version' => '2.0.4.0',
  666. 'aliases' =>
  667. array (
  668. ),
  669. 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
  670. ),
  671. 'phpunit/php-timer' =>
  672. array (
  673. 'pretty_version' => '5.0.3',
  674. 'version' => '5.0.3.0',
  675. 'aliases' =>
  676. array (
  677. ),
  678. 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
  679. ),
  680. 'phpunit/phpunit' =>
  681. array (
  682. 'pretty_version' => '9.6.9',
  683. 'version' => '9.6.9.0',
  684. 'aliases' =>
  685. array (
  686. ),
  687. 'reference' => 'a9aceaf20a682aeacf28d582654a1670d8826778',
  688. ),
  689. 'psr/cache' =>
  690. array (
  691. 'pretty_version' => '1.0.1',
  692. 'version' => '1.0.1.0',
  693. 'aliases' =>
  694. array (
  695. ),
  696. 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
  697. ),
  698. 'psr/container' =>
  699. array (
  700. 'pretty_version' => '2.0.2',
  701. 'version' => '2.0.2.0',
  702. 'aliases' =>
  703. array (
  704. ),
  705. 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
  706. ),
  707. 'psr/event-dispatcher' =>
  708. array (
  709. 'pretty_version' => '1.0.0',
  710. 'version' => '1.0.0.0',
  711. 'aliases' =>
  712. array (
  713. ),
  714. 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0',
  715. ),
  716. 'psr/event-dispatcher-implementation' =>
  717. array (
  718. 'provided' =>
  719. array (
  720. 0 => '1.0',
  721. ),
  722. ),
  723. 'psr/http-client' =>
  724. array (
  725. 'pretty_version' => '1.0.2',
  726. 'version' => '1.0.2.0',
  727. 'aliases' =>
  728. array (
  729. ),
  730. 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31',
  731. ),
  732. 'psr/http-client-implementation' =>
  733. array (
  734. 'provided' =>
  735. array (
  736. 0 => '1.0',
  737. ),
  738. ),
  739. 'psr/http-factory' =>
  740. array (
  741. 'pretty_version' => '1.0.2',
  742. 'version' => '1.0.2.0',
  743. 'aliases' =>
  744. array (
  745. ),
  746. 'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
  747. ),
  748. 'psr/http-factory-implementation' =>
  749. array (
  750. 'provided' =>
  751. array (
  752. 0 => '1.0',
  753. ),
  754. ),
  755. 'psr/http-message' =>
  756. array (
  757. 'pretty_version' => '1.1',
  758. 'version' => '1.1.0.0',
  759. 'aliases' =>
  760. array (
  761. ),
  762. 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
  763. ),
  764. 'psr/http-message-implementation' =>
  765. array (
  766. 'provided' =>
  767. array (
  768. 0 => '1.0',
  769. ),
  770. ),
  771. 'psr/http-server-handler' =>
  772. array (
  773. 'pretty_version' => '1.0.2',
  774. 'version' => '1.0.2.0',
  775. 'aliases' =>
  776. array (
  777. ),
  778. 'reference' => '84c4fb66179be4caaf8e97bd239203245302e7d4',
  779. ),
  780. 'psr/http-server-middleware' =>
  781. array (
  782. 'pretty_version' => '1.0.2',
  783. 'version' => '1.0.2.0',
  784. 'aliases' =>
  785. array (
  786. ),
  787. 'reference' => 'c1481f747daaa6a0782775cd6a8c26a1bf4a3829',
  788. ),
  789. 'psr/log' =>
  790. array (
  791. 'pretty_version' => '1.1.4',
  792. 'version' => '1.1.4.0',
  793. 'aliases' =>
  794. array (
  795. ),
  796. 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
  797. ),
  798. 'psr/log-implementation' =>
  799. array (
  800. 'provided' =>
  801. array (
  802. 0 => '1.0.0 || 2.0.0 || 3.0.0',
  803. 1 => '1.0|2.0',
  804. ),
  805. ),
  806. 'psr/simple-cache' =>
  807. array (
  808. 'pretty_version' => '1.0.1',
  809. 'version' => '1.0.1.0',
  810. 'aliases' =>
  811. array (
  812. ),
  813. 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
  814. ),
  815. 'ralouphie/getallheaders' =>
  816. array (
  817. 'pretty_version' => '3.0.3',
  818. 'version' => '3.0.3.0',
  819. 'aliases' =>
  820. array (
  821. ),
  822. 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
  823. ),
  824. 'sebastian/cli-parser' =>
  825. array (
  826. 'pretty_version' => '1.0.1',
  827. 'version' => '1.0.1.0',
  828. 'aliases' =>
  829. array (
  830. ),
  831. 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
  832. ),
  833. 'sebastian/code-unit' =>
  834. array (
  835. 'pretty_version' => '1.0.8',
  836. 'version' => '1.0.8.0',
  837. 'aliases' =>
  838. array (
  839. ),
  840. 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
  841. ),
  842. 'sebastian/code-unit-reverse-lookup' =>
  843. array (
  844. 'pretty_version' => '2.0.3',
  845. 'version' => '2.0.3.0',
  846. 'aliases' =>
  847. array (
  848. ),
  849. 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
  850. ),
  851. 'sebastian/comparator' =>
  852. array (
  853. 'pretty_version' => '4.0.8',
  854. 'version' => '4.0.8.0',
  855. 'aliases' =>
  856. array (
  857. ),
  858. 'reference' => 'fa0f136dd2334583309d32b62544682ee972b51a',
  859. ),
  860. 'sebastian/complexity' =>
  861. array (
  862. 'pretty_version' => '2.0.2',
  863. 'version' => '2.0.2.0',
  864. 'aliases' =>
  865. array (
  866. ),
  867. 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
  868. ),
  869. 'sebastian/diff' =>
  870. array (
  871. 'pretty_version' => '4.0.5',
  872. 'version' => '4.0.5.0',
  873. 'aliases' =>
  874. array (
  875. ),
  876. 'reference' => '74be17022044ebaaecfdf0c5cd504fc9cd5a7131',
  877. ),
  878. 'sebastian/environment' =>
  879. array (
  880. 'pretty_version' => '5.1.5',
  881. 'version' => '5.1.5.0',
  882. 'aliases' =>
  883. array (
  884. ),
  885. 'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed',
  886. ),
  887. 'sebastian/exporter' =>
  888. array (
  889. 'pretty_version' => '4.0.5',
  890. 'version' => '4.0.5.0',
  891. 'aliases' =>
  892. array (
  893. ),
  894. 'reference' => 'ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d',
  895. ),
  896. 'sebastian/global-state' =>
  897. array (
  898. 'pretty_version' => '5.0.5',
  899. 'version' => '5.0.5.0',
  900. 'aliases' =>
  901. array (
  902. ),
  903. 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
  904. ),
  905. 'sebastian/lines-of-code' =>
  906. array (
  907. 'pretty_version' => '1.0.3',
  908. 'version' => '1.0.3.0',
  909. 'aliases' =>
  910. array (
  911. ),
  912. 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
  913. ),
  914. 'sebastian/object-enumerator' =>
  915. array (
  916. 'pretty_version' => '4.0.4',
  917. 'version' => '4.0.4.0',
  918. 'aliases' =>
  919. array (
  920. ),
  921. 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
  922. ),
  923. 'sebastian/object-reflector' =>
  924. array (
  925. 'pretty_version' => '2.0.4',
  926. 'version' => '2.0.4.0',
  927. 'aliases' =>
  928. array (
  929. ),
  930. 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
  931. ),
  932. 'sebastian/recursion-context' =>
  933. array (
  934. 'pretty_version' => '4.0.5',
  935. 'version' => '4.0.5.0',
  936. 'aliases' =>
  937. array (
  938. ),
  939. 'reference' => 'e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1',
  940. ),
  941. 'sebastian/resource-operations' =>
  942. array (
  943. 'pretty_version' => '3.0.3',
  944. 'version' => '3.0.3.0',
  945. 'aliases' =>
  946. array (
  947. ),
  948. 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
  949. ),
  950. 'sebastian/type' =>
  951. array (
  952. 'pretty_version' => '3.2.1',
  953. 'version' => '3.2.1.0',
  954. 'aliases' =>
  955. array (
  956. ),
  957. 'reference' => '75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7',
  958. ),
  959. 'sebastian/version' =>
  960. array (
  961. 'pretty_version' => '3.0.2',
  962. 'version' => '3.0.2.0',
  963. 'aliases' =>
  964. array (
  965. ),
  966. 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
  967. ),
  968. 'simplito/bigint-wrapper-php' =>
  969. array (
  970. 'pretty_version' => '1.0.0',
  971. 'version' => '1.0.0.0',
  972. 'aliases' =>
  973. array (
  974. ),
  975. 'reference' => 'cf21ec76d33f103add487b3eadbd9f5033a25930',
  976. ),
  977. 'simplito/bn-php' =>
  978. array (
  979. 'pretty_version' => '1.1.3',
  980. 'version' => '1.1.3.0',
  981. 'aliases' =>
  982. array (
  983. ),
  984. 'reference' => '189167f940cdb681288a967b0f4d66de81adcd97',
  985. ),
  986. 'simplito/elliptic-php' =>
  987. array (
  988. 'pretty_version' => '1.0.10',
  989. 'version' => '1.0.10.0',
  990. 'aliases' =>
  991. array (
  992. ),
  993. 'reference' => 'a6228f480c729cf8efe2650a617c8500e981716d',
  994. ),
  995. 'swoole/ide-helper' =>
  996. array (
  997. 'pretty_version' => '4.8.13',
  998. 'version' => '4.8.13.0',
  999. 'aliases' =>
  1000. array (
  1001. ),
  1002. 'reference' => 'd100c446b2e3d56430cbcab5dc3fa20a9f35c4ef',
  1003. ),
  1004. 'symfony/console' =>
  1005. array (
  1006. 'pretty_version' => 'v5.4.11',
  1007. 'version' => '5.4.11.0',
  1008. 'aliases' =>
  1009. array (
  1010. ),
  1011. 'reference' => '535846c7ee6bc4dd027ca0d93220601456734b10',
  1012. ),
  1013. 'symfony/deprecation-contracts' =>
  1014. array (
  1015. 'pretty_version' => 'v2.5.2',
  1016. 'version' => '2.5.2.0',
  1017. 'aliases' =>
  1018. array (
  1019. ),
  1020. 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
  1021. ),
  1022. 'symfony/event-dispatcher' =>
  1023. array (
  1024. 'pretty_version' => 'v5.4.22',
  1025. 'version' => '5.4.22.0',
  1026. 'aliases' =>
  1027. array (
  1028. ),
  1029. 'reference' => '1df20e45d56da29a4b1d8259dd6e950acbf1b13f',
  1030. ),
  1031. 'symfony/event-dispatcher-contracts' =>
  1032. array (
  1033. 'pretty_version' => 'v2.5.2',
  1034. 'version' => '2.5.2.0',
  1035. 'aliases' =>
  1036. array (
  1037. ),
  1038. 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1',
  1039. ),
  1040. 'symfony/event-dispatcher-implementation' =>
  1041. array (
  1042. 'provided' =>
  1043. array (
  1044. 0 => '2.0',
  1045. ),
  1046. ),
  1047. 'symfony/filesystem' =>
  1048. array (
  1049. 'pretty_version' => 'v5.4.25',
  1050. 'version' => '5.4.25.0',
  1051. 'aliases' =>
  1052. array (
  1053. ),
  1054. 'reference' => '0ce3a62c9579a53358d3a7eb6b3dfb79789a6364',
  1055. ),
  1056. 'symfony/finder' =>
  1057. array (
  1058. 'pretty_version' => 'v5.4.21',
  1059. 'version' => '5.4.21.0',
  1060. 'aliases' =>
  1061. array (
  1062. ),
  1063. 'reference' => '078e9a5e1871fcfe6a5ce421b539344c21afef19',
  1064. ),
  1065. 'symfony/options-resolver' =>
  1066. array (
  1067. 'pretty_version' => 'v5.4.21',
  1068. 'version' => '5.4.21.0',
  1069. 'aliases' =>
  1070. array (
  1071. ),
  1072. 'reference' => '4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9',
  1073. ),
  1074. 'symfony/polyfill-ctype' =>
  1075. array (
  1076. 'pretty_version' => 'v1.27.0',
  1077. 'version' => '1.27.0.0',
  1078. 'aliases' =>
  1079. array (
  1080. ),
  1081. 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
  1082. ),
  1083. 'symfony/polyfill-intl-grapheme' =>
  1084. array (
  1085. 'pretty_version' => 'v1.27.0',
  1086. 'version' => '1.27.0.0',
  1087. 'aliases' =>
  1088. array (
  1089. ),
  1090. 'reference' => '511a08c03c1960e08a883f4cffcacd219b758354',
  1091. ),
  1092. 'symfony/polyfill-intl-normalizer' =>
  1093. array (
  1094. 'pretty_version' => 'v1.27.0',
  1095. 'version' => '1.27.0.0',
  1096. 'aliases' =>
  1097. array (
  1098. ),
  1099. 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6',
  1100. ),
  1101. 'symfony/polyfill-mbstring' =>
  1102. array (
  1103. 'pretty_version' => 'v1.27.0',
  1104. 'version' => '1.27.0.0',
  1105. 'aliases' =>
  1106. array (
  1107. ),
  1108. 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
  1109. ),
  1110. 'symfony/polyfill-php73' =>
  1111. array (
  1112. 'pretty_version' => 'v1.27.0',
  1113. 'version' => '1.27.0.0',
  1114. 'aliases' =>
  1115. array (
  1116. ),
  1117. 'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9',
  1118. ),
  1119. 'symfony/polyfill-php80' =>
  1120. array (
  1121. 'pretty_version' => 'v1.27.0',
  1122. 'version' => '1.27.0.0',
  1123. 'aliases' =>
  1124. array (
  1125. ),
  1126. 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
  1127. ),
  1128. 'symfony/polyfill-php81' =>
  1129. array (
  1130. 'pretty_version' => 'v1.27.0',
  1131. 'version' => '1.27.0.0',
  1132. 'aliases' =>
  1133. array (
  1134. ),
  1135. 'reference' => '707403074c8ea6e2edaf8794b0157a0bfa52157a',
  1136. ),
  1137. 'symfony/process' =>
  1138. array (
  1139. 'pretty_version' => 'v5.4.24',
  1140. 'version' => '5.4.24.0',
  1141. 'aliases' =>
  1142. array (
  1143. ),
  1144. 'reference' => 'e3c46cc5689c8782944274bb30702106ecbe3b64',
  1145. ),
  1146. 'symfony/service-contracts' =>
  1147. array (
  1148. 'pretty_version' => 'v1.1.2',
  1149. 'version' => '1.1.2.0',
  1150. 'aliases' =>
  1151. array (
  1152. ),
  1153. 'reference' => '191afdcb5804db960d26d8566b7e9a2843cab3a0',
  1154. ),
  1155. 'symfony/stopwatch' =>
  1156. array (
  1157. 'pretty_version' => 'v5.4.21',
  1158. 'version' => '5.4.21.0',
  1159. 'aliases' =>
  1160. array (
  1161. ),
  1162. 'reference' => 'f83692cd869a6f2391691d40a01e8acb89e76fee',
  1163. ),
  1164. 'symfony/string' =>
  1165. array (
  1166. 'pretty_version' => 'v5.4.22',
  1167. 'version' => '5.4.22.0',
  1168. 'aliases' =>
  1169. array (
  1170. ),
  1171. 'reference' => '8036a4c76c0dd29e60b6a7cafcacc50cf088ea62',
  1172. ),
  1173. 'symfony/translation' =>
  1174. array (
  1175. 'pretty_version' => 'v5.4.24',
  1176. 'version' => '5.4.24.0',
  1177. 'aliases' =>
  1178. array (
  1179. ),
  1180. 'reference' => 'de237e59c5833422342be67402d487fbf50334ff',
  1181. ),
  1182. 'symfony/translation-contracts' =>
  1183. array (
  1184. 'pretty_version' => 'v2.5.2',
  1185. 'version' => '2.5.2.0',
  1186. 'aliases' =>
  1187. array (
  1188. ),
  1189. 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe',
  1190. ),
  1191. 'symfony/translation-implementation' =>
  1192. array (
  1193. 'provided' =>
  1194. array (
  1195. 0 => '2.3',
  1196. ),
  1197. ),
  1198. 'theseer/tokenizer' =>
  1199. array (
  1200. 'pretty_version' => '1.2.1',
  1201. 'version' => '1.2.1.0',
  1202. 'aliases' =>
  1203. array (
  1204. ),
  1205. 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
  1206. ),
  1207. 'vlucas/phpdotenv' =>
  1208. array (
  1209. 'pretty_version' => 'v5.5.0',
  1210. 'version' => '5.5.0.0',
  1211. 'aliases' =>
  1212. array (
  1213. ),
  1214. 'reference' => '1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7',
  1215. ),
  1216. ),
  1217. );
  1218. private static $canGetVendors;
  1219. private static $installedByVendor = array();
  1220. public static function getInstalledPackages()
  1221. {
  1222. $packages = array();
  1223. foreach (self::getInstalled() as $installed) {
  1224. $packages[] = array_keys($installed['versions']);
  1225. }
  1226. if (1 === \count($packages)) {
  1227. return $packages[0];
  1228. }
  1229. return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
  1230. }
  1231. public static function isInstalled($packageName)
  1232. {
  1233. foreach (self::getInstalled() as $installed) {
  1234. if (isset($installed['versions'][$packageName])) {
  1235. return true;
  1236. }
  1237. }
  1238. return false;
  1239. }
  1240. public static function satisfies(VersionParser $parser, $packageName, $constraint)
  1241. {
  1242. $constraint = $parser->parseConstraints($constraint);
  1243. $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
  1244. return $provided->matches($constraint);
  1245. }
  1246. public static function getVersionRanges($packageName)
  1247. {
  1248. foreach (self::getInstalled() as $installed) {
  1249. if (!isset($installed['versions'][$packageName])) {
  1250. continue;
  1251. }
  1252. $ranges = array();
  1253. if (isset($installed['versions'][$packageName]['pretty_version'])) {
  1254. $ranges[] = $installed['versions'][$packageName]['pretty_version'];
  1255. }
  1256. if (array_key_exists('aliases', $installed['versions'][$packageName])) {
  1257. $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
  1258. }
  1259. if (array_key_exists('replaced', $installed['versions'][$packageName])) {
  1260. $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
  1261. }
  1262. if (array_key_exists('provided', $installed['versions'][$packageName])) {
  1263. $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
  1264. }
  1265. return implode(' || ', $ranges);
  1266. }
  1267. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1268. }
  1269. public static function getVersion($packageName)
  1270. {
  1271. foreach (self::getInstalled() as $installed) {
  1272. if (!isset($installed['versions'][$packageName])) {
  1273. continue;
  1274. }
  1275. if (!isset($installed['versions'][$packageName]['version'])) {
  1276. return null;
  1277. }
  1278. return $installed['versions'][$packageName]['version'];
  1279. }
  1280. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1281. }
  1282. public static function getPrettyVersion($packageName)
  1283. {
  1284. foreach (self::getInstalled() as $installed) {
  1285. if (!isset($installed['versions'][$packageName])) {
  1286. continue;
  1287. }
  1288. if (!isset($installed['versions'][$packageName]['pretty_version'])) {
  1289. return null;
  1290. }
  1291. return $installed['versions'][$packageName]['pretty_version'];
  1292. }
  1293. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1294. }
  1295. public static function getReference($packageName)
  1296. {
  1297. foreach (self::getInstalled() as $installed) {
  1298. if (!isset($installed['versions'][$packageName])) {
  1299. continue;
  1300. }
  1301. if (!isset($installed['versions'][$packageName]['reference'])) {
  1302. return null;
  1303. }
  1304. return $installed['versions'][$packageName]['reference'];
  1305. }
  1306. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1307. }
  1308. public static function getRootPackage()
  1309. {
  1310. $installed = self::getInstalled();
  1311. return $installed[0]['root'];
  1312. }
  1313. public static function getRawData()
  1314. {
  1315. @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);
  1316. return self::$installed;
  1317. }
  1318. public static function getAllRawData()
  1319. {
  1320. return self::getInstalled();
  1321. }
  1322. public static function reload($data)
  1323. {
  1324. self::$installed = $data;
  1325. self::$installedByVendor = array();
  1326. }
  1327. private static function getInstalled()
  1328. {
  1329. if (null === self::$canGetVendors) {
  1330. self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
  1331. }
  1332. $installed = array();
  1333. if (self::$canGetVendors) {
  1334. foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
  1335. if (isset(self::$installedByVendor[$vendorDir])) {
  1336. $installed[] = self::$installedByVendor[$vendorDir];
  1337. } elseif (is_file($vendorDir.'/composer/installed.php')) {
  1338. $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
  1339. }
  1340. }
  1341. }
  1342. $installed[] = self::$installed;
  1343. return $installed;
  1344. }
  1345. }