InstalledVersions.php 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555
  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' => 'laravel/laravel',
  17. ),
  18. 'versions' =>
  19. array (
  20. 'bacon/bacon-qr-code' =>
  21. array (
  22. 'pretty_version' => '1.0.3',
  23. 'version' => '1.0.3.0',
  24. 'aliases' =>
  25. array (
  26. ),
  27. 'reference' => '5a91b62b9d37cee635bbf8d553f4546057250bee',
  28. ),
  29. 'beyondcode/laravel-dump-server' =>
  30. array (
  31. 'pretty_version' => '1.9.0',
  32. 'version' => '1.9.0.0',
  33. 'aliases' =>
  34. array (
  35. ),
  36. 'reference' => '1f2452617afc64e47b3cf49978beb7beeef084df',
  37. ),
  38. 'brick/math' =>
  39. array (
  40. 'pretty_version' => '0.9.3',
  41. 'version' => '0.9.3.0',
  42. 'aliases' =>
  43. array (
  44. ),
  45. 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae',
  46. ),
  47. 'carbonphp/carbon-doctrine-types' =>
  48. array (
  49. 'pretty_version' => '2.1.0',
  50. 'version' => '2.1.0.0',
  51. 'aliases' =>
  52. array (
  53. ),
  54. 'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb',
  55. ),
  56. 'cblink/region' =>
  57. array (
  58. 'pretty_version' => '1.0.4',
  59. 'version' => '1.0.4.0',
  60. 'aliases' =>
  61. array (
  62. ),
  63. 'reference' => '2730bac7a3d11e43931eb48a6ae7a2eb9e924e7b',
  64. ),
  65. 'composer/semver' =>
  66. array (
  67. 'pretty_version' => '3.4.0',
  68. 'version' => '3.4.0.0',
  69. 'aliases' =>
  70. array (
  71. ),
  72. 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32',
  73. ),
  74. 'cordoval/hamcrest-php' =>
  75. array (
  76. 'replaced' =>
  77. array (
  78. 0 => '*',
  79. ),
  80. ),
  81. 'davedevelopment/hamcrest-php' =>
  82. array (
  83. 'replaced' =>
  84. array (
  85. 0 => '*',
  86. ),
  87. ),
  88. 'dflydev/dot-access-data' =>
  89. array (
  90. 'pretty_version' => 'v3.0.2',
  91. 'version' => '3.0.2.0',
  92. 'aliases' =>
  93. array (
  94. ),
  95. 'reference' => 'f41715465d65213d644d3141a6a93081be5d3549',
  96. ),
  97. 'doctrine/inflector' =>
  98. array (
  99. 'pretty_version' => '2.0.10',
  100. 'version' => '2.0.10.0',
  101. 'aliases' =>
  102. array (
  103. ),
  104. 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc',
  105. ),
  106. 'doctrine/lexer' =>
  107. array (
  108. 'pretty_version' => '1.2.3',
  109. 'version' => '1.2.3.0',
  110. 'aliases' =>
  111. array (
  112. ),
  113. 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229',
  114. ),
  115. 'dragonmantank/cron-expression' =>
  116. array (
  117. 'pretty_version' => 'v3.3.3',
  118. 'version' => '3.3.3.0',
  119. 'aliases' =>
  120. array (
  121. ),
  122. 'reference' => 'adfb1f505deb6384dc8b39804c5065dd3c8c8c0a',
  123. ),
  124. 'egulias/email-validator' =>
  125. array (
  126. 'pretty_version' => '2.1.25',
  127. 'version' => '2.1.25.0',
  128. 'aliases' =>
  129. array (
  130. ),
  131. 'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4',
  132. ),
  133. 'ezyang/htmlpurifier' =>
  134. array (
  135. 'pretty_version' => 'v4.17.0',
  136. 'version' => '4.17.0.0',
  137. 'aliases' =>
  138. array (
  139. ),
  140. 'reference' => 'bbc513d79acf6691fa9cf10f192c90dd2957f18c',
  141. ),
  142. 'fideloper/proxy' =>
  143. array (
  144. 'pretty_version' => '4.4.2',
  145. 'version' => '4.4.2.0',
  146. 'aliases' =>
  147. array (
  148. ),
  149. 'reference' => 'a751f2bc86dd8e6cfef12dc0cbdada82f5a18750',
  150. ),
  151. 'filp/whoops' =>
  152. array (
  153. 'pretty_version' => '2.15.4',
  154. 'version' => '2.15.4.0',
  155. 'aliases' =>
  156. array (
  157. ),
  158. 'reference' => 'a139776fa3f5985a50b509f2a02ff0f709d2a546',
  159. ),
  160. 'fzaninotto/faker' =>
  161. array (
  162. 'pretty_version' => 'v1.9.2',
  163. 'version' => '1.9.2.0',
  164. 'aliases' =>
  165. array (
  166. ),
  167. 'reference' => '848d8125239d7dbf8ab25cb7f054f1a630e68c2e',
  168. ),
  169. 'graham-campbell/result-type' =>
  170. array (
  171. 'pretty_version' => 'v1.1.2',
  172. 'version' => '1.1.2.0',
  173. 'aliases' =>
  174. array (
  175. ),
  176. 'reference' => 'fbd48bce38f73f8a4ec8583362e732e4095e5862',
  177. ),
  178. 'guzzlehttp/guzzle' =>
  179. array (
  180. 'pretty_version' => '7.8.1',
  181. 'version' => '7.8.1.0',
  182. 'aliases' =>
  183. array (
  184. ),
  185. 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
  186. ),
  187. 'guzzlehttp/promises' =>
  188. array (
  189. 'pretty_version' => '2.0.2',
  190. 'version' => '2.0.2.0',
  191. 'aliases' =>
  192. array (
  193. ),
  194. 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
  195. ),
  196. 'guzzlehttp/psr7' =>
  197. array (
  198. 'pretty_version' => '2.6.2',
  199. 'version' => '2.6.2.0',
  200. 'aliases' =>
  201. array (
  202. ),
  203. 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
  204. ),
  205. 'hamcrest/hamcrest-php' =>
  206. array (
  207. 'pretty_version' => 'v2.0.1',
  208. 'version' => '2.0.1.0',
  209. 'aliases' =>
  210. array (
  211. ),
  212. 'reference' => '8c3d0a3f6af734494ad8f6fbbee0ba92422859f3',
  213. ),
  214. 'illuminate/auth' =>
  215. array (
  216. 'replaced' =>
  217. array (
  218. 0 => 'v8.83.27',
  219. ),
  220. ),
  221. 'illuminate/broadcasting' =>
  222. array (
  223. 'replaced' =>
  224. array (
  225. 0 => 'v8.83.27',
  226. ),
  227. ),
  228. 'illuminate/bus' =>
  229. array (
  230. 'replaced' =>
  231. array (
  232. 0 => 'v8.83.27',
  233. ),
  234. ),
  235. 'illuminate/cache' =>
  236. array (
  237. 'replaced' =>
  238. array (
  239. 0 => 'v8.83.27',
  240. ),
  241. ),
  242. 'illuminate/collections' =>
  243. array (
  244. 'replaced' =>
  245. array (
  246. 0 => 'v8.83.27',
  247. ),
  248. ),
  249. 'illuminate/config' =>
  250. array (
  251. 'replaced' =>
  252. array (
  253. 0 => 'v8.83.27',
  254. ),
  255. ),
  256. 'illuminate/console' =>
  257. array (
  258. 'replaced' =>
  259. array (
  260. 0 => 'v8.83.27',
  261. ),
  262. ),
  263. 'illuminate/container' =>
  264. array (
  265. 'replaced' =>
  266. array (
  267. 0 => 'v8.83.27',
  268. ),
  269. ),
  270. 'illuminate/contracts' =>
  271. array (
  272. 'replaced' =>
  273. array (
  274. 0 => 'v8.83.27',
  275. ),
  276. ),
  277. 'illuminate/cookie' =>
  278. array (
  279. 'replaced' =>
  280. array (
  281. 0 => 'v8.83.27',
  282. ),
  283. ),
  284. 'illuminate/database' =>
  285. array (
  286. 'replaced' =>
  287. array (
  288. 0 => 'v8.83.27',
  289. ),
  290. ),
  291. 'illuminate/encryption' =>
  292. array (
  293. 'replaced' =>
  294. array (
  295. 0 => 'v8.83.27',
  296. ),
  297. ),
  298. 'illuminate/events' =>
  299. array (
  300. 'replaced' =>
  301. array (
  302. 0 => 'v8.83.27',
  303. ),
  304. ),
  305. 'illuminate/filesystem' =>
  306. array (
  307. 'replaced' =>
  308. array (
  309. 0 => 'v8.83.27',
  310. ),
  311. ),
  312. 'illuminate/hashing' =>
  313. array (
  314. 'replaced' =>
  315. array (
  316. 0 => 'v8.83.27',
  317. ),
  318. ),
  319. 'illuminate/http' =>
  320. array (
  321. 'replaced' =>
  322. array (
  323. 0 => 'v8.83.27',
  324. ),
  325. ),
  326. 'illuminate/log' =>
  327. array (
  328. 'replaced' =>
  329. array (
  330. 0 => 'v8.83.27',
  331. ),
  332. ),
  333. 'illuminate/macroable' =>
  334. array (
  335. 'replaced' =>
  336. array (
  337. 0 => 'v8.83.27',
  338. ),
  339. ),
  340. 'illuminate/mail' =>
  341. array (
  342. 'replaced' =>
  343. array (
  344. 0 => 'v8.83.27',
  345. ),
  346. ),
  347. 'illuminate/notifications' =>
  348. array (
  349. 'replaced' =>
  350. array (
  351. 0 => 'v8.83.27',
  352. ),
  353. ),
  354. 'illuminate/pagination' =>
  355. array (
  356. 'replaced' =>
  357. array (
  358. 0 => 'v8.83.27',
  359. ),
  360. ),
  361. 'illuminate/pipeline' =>
  362. array (
  363. 'replaced' =>
  364. array (
  365. 0 => 'v8.83.27',
  366. ),
  367. ),
  368. 'illuminate/queue' =>
  369. array (
  370. 'replaced' =>
  371. array (
  372. 0 => 'v8.83.27',
  373. ),
  374. ),
  375. 'illuminate/redis' =>
  376. array (
  377. 'replaced' =>
  378. array (
  379. 0 => 'v8.83.27',
  380. ),
  381. ),
  382. 'illuminate/routing' =>
  383. array (
  384. 'replaced' =>
  385. array (
  386. 0 => 'v8.83.27',
  387. ),
  388. ),
  389. 'illuminate/session' =>
  390. array (
  391. 'replaced' =>
  392. array (
  393. 0 => 'v8.83.27',
  394. ),
  395. ),
  396. 'illuminate/support' =>
  397. array (
  398. 'replaced' =>
  399. array (
  400. 0 => 'v8.83.27',
  401. ),
  402. ),
  403. 'illuminate/testing' =>
  404. array (
  405. 'replaced' =>
  406. array (
  407. 0 => 'v8.83.27',
  408. ),
  409. ),
  410. 'illuminate/translation' =>
  411. array (
  412. 'replaced' =>
  413. array (
  414. 0 => 'v8.83.27',
  415. ),
  416. ),
  417. 'illuminate/validation' =>
  418. array (
  419. 'replaced' =>
  420. array (
  421. 0 => 'v8.83.27',
  422. ),
  423. ),
  424. 'illuminate/view' =>
  425. array (
  426. 'replaced' =>
  427. array (
  428. 0 => 'v8.83.27',
  429. ),
  430. ),
  431. 'intervention/image' =>
  432. array (
  433. 'pretty_version' => '2.7.2',
  434. 'version' => '2.7.2.0',
  435. 'aliases' =>
  436. array (
  437. ),
  438. 'reference' => '04be355f8d6734c826045d02a1079ad658322dad',
  439. ),
  440. 'irazasyed/telegram-bot-sdk' =>
  441. array (
  442. 'pretty_version' => 'v3.9',
  443. 'version' => '3.9.0.0',
  444. 'aliases' =>
  445. array (
  446. ),
  447. 'reference' => 'c4c8250e334e94aab7b6b4a67850e39fd5a9384b',
  448. ),
  449. 'johnlui/aliyun-oss' =>
  450. array (
  451. 'pretty_version' => 'v2.2.1',
  452. 'version' => '2.2.1.0',
  453. 'aliases' =>
  454. array (
  455. ),
  456. 'reference' => 'f10fdec4775e22a8295366981e1daf48c62ce5d3',
  457. ),
  458. 'kodova/hamcrest-php' =>
  459. array (
  460. 'replaced' =>
  461. array (
  462. 0 => '*',
  463. ),
  464. ),
  465. 'laravel-lang/lang' =>
  466. array (
  467. 'pretty_version' => '3.0.62',
  468. 'version' => '3.0.62.0',
  469. 'aliases' =>
  470. array (
  471. ),
  472. 'reference' => 'fcb8cec051b175278e0a9efa440f0b1033d12dd7',
  473. ),
  474. 'laravel/framework' =>
  475. array (
  476. 'pretty_version' => 'v8.83.27',
  477. 'version' => '8.83.27.0',
  478. 'aliases' =>
  479. array (
  480. ),
  481. 'reference' => 'e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49',
  482. ),
  483. 'laravel/laravel' =>
  484. array (
  485. 'pretty_version' => '1.0.0+no-version-set',
  486. 'version' => '1.0.0.0',
  487. 'aliases' =>
  488. array (
  489. ),
  490. 'reference' => NULL,
  491. ),
  492. 'laravel/serializable-closure' =>
  493. array (
  494. 'pretty_version' => 'v1.3.3',
  495. 'version' => '1.3.3.0',
  496. 'aliases' =>
  497. array (
  498. ),
  499. 'reference' => '3dbf8a8e914634c48d389c1234552666b3d43754',
  500. ),
  501. 'laravel/tinker' =>
  502. array (
  503. 'pretty_version' => 'v2.9.0',
  504. 'version' => '2.9.0.0',
  505. 'aliases' =>
  506. array (
  507. ),
  508. 'reference' => '502e0fe3f0415d06d5db1f83a472f0f3b754bafe',
  509. ),
  510. 'laravel/ui' =>
  511. array (
  512. 'pretty_version' => 'v3.4.6',
  513. 'version' => '3.4.6.0',
  514. 'aliases' =>
  515. array (
  516. ),
  517. 'reference' => '65ec5c03f7fee2c8ecae785795b829a15be48c2c',
  518. ),
  519. 'league/commonmark' =>
  520. array (
  521. 'pretty_version' => '2.4.2',
  522. 'version' => '2.4.2.0',
  523. 'aliases' =>
  524. array (
  525. ),
  526. 'reference' => '91c24291965bd6d7c46c46a12ba7492f83b1cadf',
  527. ),
  528. 'league/config' =>
  529. array (
  530. 'pretty_version' => 'v1.2.0',
  531. 'version' => '1.2.0.0',
  532. 'aliases' =>
  533. array (
  534. ),
  535. 'reference' => '754b3604fb2984c71f4af4a9cbe7b57f346ec1f3',
  536. ),
  537. 'league/event' =>
  538. array (
  539. 'pretty_version' => '2.2.0',
  540. 'version' => '2.2.0.0',
  541. 'aliases' =>
  542. array (
  543. ),
  544. 'reference' => 'd2cc124cf9a3fab2bb4ff963307f60361ce4d119',
  545. ),
  546. 'league/flysystem' =>
  547. array (
  548. 'pretty_version' => '1.1.10',
  549. 'version' => '1.1.10.0',
  550. 'aliases' =>
  551. array (
  552. ),
  553. 'reference' => '3239285c825c152bcc315fe0e87d6b55f5972ed1',
  554. ),
  555. 'league/mime-type-detection' =>
  556. array (
  557. 'pretty_version' => '1.15.0',
  558. 'version' => '1.15.0.0',
  559. 'aliases' =>
  560. array (
  561. ),
  562. 'reference' => 'ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301',
  563. ),
  564. 'maatwebsite/excel' =>
  565. array (
  566. 'pretty_version' => '3.1.55',
  567. 'version' => '3.1.55.0',
  568. 'aliases' =>
  569. array (
  570. ),
  571. 'reference' => '6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260',
  572. ),
  573. 'maennchen/zipstream-php' =>
  574. array (
  575. 'pretty_version' => '2.2.6',
  576. 'version' => '2.2.6.0',
  577. 'aliases' =>
  578. array (
  579. ),
  580. 'reference' => '30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f',
  581. ),
  582. 'markbaker/complex' =>
  583. array (
  584. 'pretty_version' => '3.0.2',
  585. 'version' => '3.0.2.0',
  586. 'aliases' =>
  587. array (
  588. ),
  589. 'reference' => '95c56caa1cf5c766ad6d65b6344b807c1e8405b9',
  590. ),
  591. 'markbaker/matrix' =>
  592. array (
  593. 'pretty_version' => '3.0.1',
  594. 'version' => '3.0.1.0',
  595. 'aliases' =>
  596. array (
  597. ),
  598. 'reference' => '728434227fe21be27ff6d86621a1b13107a2562c',
  599. ),
  600. 'mews/captcha' =>
  601. array (
  602. 'pretty_version' => '3.3.3',
  603. 'version' => '3.3.3.0',
  604. 'aliases' =>
  605. array (
  606. ),
  607. 'reference' => 'e996a9a5638296de3e9dac41782dbdcf3d14ce11',
  608. ),
  609. 'mockery/mockery' =>
  610. array (
  611. 'pretty_version' => '1.6.11',
  612. 'version' => '1.6.11.0',
  613. 'aliases' =>
  614. array (
  615. ),
  616. 'reference' => '81a161d0b135df89951abd52296adf97deb0723d',
  617. ),
  618. 'monolog/monolog' =>
  619. array (
  620. 'pretty_version' => '2.9.2',
  621. 'version' => '2.9.2.0',
  622. 'aliases' =>
  623. array (
  624. ),
  625. 'reference' => '437cb3628f4cf6042cc10ae97fc2b8472e48ca1f',
  626. ),
  627. 'mtdowling/cron-expression' =>
  628. array (
  629. 'replaced' =>
  630. array (
  631. 0 => '^1.0',
  632. ),
  633. ),
  634. 'myclabs/php-enum' =>
  635. array (
  636. 'pretty_version' => '1.8.4',
  637. 'version' => '1.8.4.0',
  638. 'aliases' =>
  639. array (
  640. ),
  641. 'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483',
  642. ),
  643. 'nesbot/carbon' =>
  644. array (
  645. 'pretty_version' => '2.72.3',
  646. 'version' => '2.72.3.0',
  647. 'aliases' =>
  648. array (
  649. ),
  650. 'reference' => '0c6fd108360c562f6e4fd1dedb8233b423e91c83',
  651. ),
  652. 'nette/schema' =>
  653. array (
  654. 'pretty_version' => 'v1.2.5',
  655. 'version' => '1.2.5.0',
  656. 'aliases' =>
  657. array (
  658. ),
  659. 'reference' => '0462f0166e823aad657c9224d0f849ecac1ba10a',
  660. ),
  661. 'nette/utils' =>
  662. array (
  663. 'pretty_version' => 'v3.2.10',
  664. 'version' => '3.2.10.0',
  665. 'aliases' =>
  666. array (
  667. ),
  668. 'reference' => 'a4175c62652f2300c8017fb7e640f9ccb11648d2',
  669. ),
  670. 'nikic/php-parser' =>
  671. array (
  672. 'pretty_version' => 'v5.0.2',
  673. 'version' => '5.0.2.0',
  674. 'aliases' =>
  675. array (
  676. ),
  677. 'reference' => '139676794dc1e9231bf7bcd123cfc0c99182cb13',
  678. ),
  679. 'opis/closure' =>
  680. array (
  681. 'pretty_version' => '3.6.3',
  682. 'version' => '3.6.3.0',
  683. 'aliases' =>
  684. array (
  685. ),
  686. 'reference' => '3d81e4309d2a927abbe66df935f4bb60082805ad',
  687. ),
  688. 'overtrue/laravel-lang' =>
  689. array (
  690. 'pretty_version' => '3.0.19',
  691. 'version' => '3.0.19.0',
  692. 'aliases' =>
  693. array (
  694. ),
  695. 'reference' => 'fb6de57a454792833c96ffdcd4999c90468deb89',
  696. ),
  697. 'overtrue/laravel-query-logger' =>
  698. array (
  699. 'pretty_version' => '2.1.4',
  700. 'version' => '2.1.4.0',
  701. 'aliases' =>
  702. array (
  703. ),
  704. 'reference' => '46b546aa2c4f6319ce798c8f8128b08718b32bae',
  705. ),
  706. 'phpoffice/phpspreadsheet' =>
  707. array (
  708. 'pretty_version' => '1.29.0',
  709. 'version' => '1.29.0.0',
  710. 'aliases' =>
  711. array (
  712. ),
  713. 'reference' => 'fde2ccf55eaef7e86021ff1acce26479160a0fa0',
  714. ),
  715. 'phpoption/phpoption' =>
  716. array (
  717. 'pretty_version' => '1.9.2',
  718. 'version' => '1.9.2.0',
  719. 'aliases' =>
  720. array (
  721. ),
  722. 'reference' => '80735db690fe4fc5c76dfa7f9b770634285fa820',
  723. ),
  724. 'predis/predis' =>
  725. array (
  726. 'pretty_version' => 'v1.1.10',
  727. 'version' => '1.1.10.0',
  728. 'aliases' =>
  729. array (
  730. ),
  731. 'reference' => 'a2fb02d738bedadcffdbb07efa3a5e7bd57f8d6e',
  732. ),
  733. 'psr/cache' =>
  734. array (
  735. 'pretty_version' => '1.0.1',
  736. 'version' => '1.0.1.0',
  737. 'aliases' =>
  738. array (
  739. ),
  740. 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
  741. ),
  742. 'psr/cache-implementation' =>
  743. array (
  744. 'provided' =>
  745. array (
  746. 0 => '1.0|2.0',
  747. ),
  748. ),
  749. 'psr/clock' =>
  750. array (
  751. 'pretty_version' => '1.0.0',
  752. 'version' => '1.0.0.0',
  753. 'aliases' =>
  754. array (
  755. ),
  756. 'reference' => 'e41a24703d4560fd0acb709162f73b8adfc3aa0d',
  757. ),
  758. 'psr/clock-implementation' =>
  759. array (
  760. 'provided' =>
  761. array (
  762. 0 => '1.0',
  763. ),
  764. ),
  765. 'psr/container' =>
  766. array (
  767. 'pretty_version' => '1.1.2',
  768. 'version' => '1.1.2.0',
  769. 'aliases' =>
  770. array (
  771. ),
  772. 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
  773. ),
  774. 'psr/container-implementation' =>
  775. array (
  776. 'provided' =>
  777. array (
  778. 0 => '1.0',
  779. ),
  780. ),
  781. 'psr/event-dispatcher' =>
  782. array (
  783. 'pretty_version' => '1.0.0',
  784. 'version' => '1.0.0.0',
  785. 'aliases' =>
  786. array (
  787. ),
  788. 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0',
  789. ),
  790. 'psr/event-dispatcher-implementation' =>
  791. array (
  792. 'provided' =>
  793. array (
  794. 0 => '1.0',
  795. ),
  796. ),
  797. 'psr/http-client' =>
  798. array (
  799. 'pretty_version' => '1.0.3',
  800. 'version' => '1.0.3.0',
  801. 'aliases' =>
  802. array (
  803. ),
  804. 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
  805. ),
  806. 'psr/http-client-implementation' =>
  807. array (
  808. 'provided' =>
  809. array (
  810. 0 => '1.0',
  811. ),
  812. ),
  813. 'psr/http-factory' =>
  814. array (
  815. 'pretty_version' => '1.0.2',
  816. 'version' => '1.0.2.0',
  817. 'aliases' =>
  818. array (
  819. ),
  820. 'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
  821. ),
  822. 'psr/http-factory-implementation' =>
  823. array (
  824. 'provided' =>
  825. array (
  826. 0 => '1.0',
  827. ),
  828. ),
  829. 'psr/http-message' =>
  830. array (
  831. 'pretty_version' => '1.1',
  832. 'version' => '1.1.0.0',
  833. 'aliases' =>
  834. array (
  835. ),
  836. 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
  837. ),
  838. 'psr/http-message-implementation' =>
  839. array (
  840. 'provided' =>
  841. array (
  842. 0 => '1.0',
  843. ),
  844. ),
  845. 'psr/log' =>
  846. array (
  847. 'pretty_version' => '1.1.4',
  848. 'version' => '1.1.4.0',
  849. 'aliases' =>
  850. array (
  851. ),
  852. 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
  853. ),
  854. 'psr/log-implementation' =>
  855. array (
  856. 'provided' =>
  857. array (
  858. 0 => '1.0.0 || 2.0.0 || 3.0.0',
  859. 1 => '1.0|2.0',
  860. ),
  861. ),
  862. 'psr/simple-cache' =>
  863. array (
  864. 'pretty_version' => '1.0.1',
  865. 'version' => '1.0.1.0',
  866. 'aliases' =>
  867. array (
  868. ),
  869. 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
  870. ),
  871. 'psr/simple-cache-implementation' =>
  872. array (
  873. 'provided' =>
  874. array (
  875. 0 => '1.0',
  876. 1 => '1.0|2.0',
  877. ),
  878. ),
  879. 'psy/psysh' =>
  880. array (
  881. 'pretty_version' => 'v0.12.2',
  882. 'version' => '0.12.2.0',
  883. 'aliases' =>
  884. array (
  885. ),
  886. 'reference' => '9185c66c2165bbf4d71de78a69dccf4974f9538d',
  887. ),
  888. 'ralouphie/getallheaders' =>
  889. array (
  890. 'pretty_version' => '3.0.3',
  891. 'version' => '3.0.3.0',
  892. 'aliases' =>
  893. array (
  894. ),
  895. 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
  896. ),
  897. 'ramsey/collection' =>
  898. array (
  899. 'pretty_version' => '1.3.0',
  900. 'version' => '1.3.0.0',
  901. 'aliases' =>
  902. array (
  903. ),
  904. 'reference' => 'ad7475d1c9e70b190ecffc58f2d989416af339b4',
  905. ),
  906. 'ramsey/uuid' =>
  907. array (
  908. 'pretty_version' => '4.2.3',
  909. 'version' => '4.2.3.0',
  910. 'aliases' =>
  911. array (
  912. ),
  913. 'reference' => 'fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df',
  914. ),
  915. 'rhumsaa/uuid' =>
  916. array (
  917. 'replaced' =>
  918. array (
  919. 0 => '4.2.3',
  920. ),
  921. ),
  922. 'simplesoftwareio/simple-qrcode' =>
  923. array (
  924. 'pretty_version' => '2.0.0',
  925. 'version' => '2.0.0.0',
  926. 'aliases' =>
  927. array (
  928. ),
  929. 'reference' => '90b2282dd29be1e52565e9832dc23af41610ea07',
  930. ),
  931. 'spatie/laravel-permission' =>
  932. array (
  933. 'pretty_version' => '5.11.1',
  934. 'version' => '5.11.1.0',
  935. 'aliases' =>
  936. array (
  937. ),
  938. 'reference' => '7090824cca57e693b880ce3aaf7ef78362e28bbd',
  939. ),
  940. 'swiftmailer/swiftmailer' =>
  941. array (
  942. 'pretty_version' => 'v6.3.0',
  943. 'version' => '6.3.0.0',
  944. 'aliases' =>
  945. array (
  946. ),
  947. 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c',
  948. ),
  949. 'symfony/cache' =>
  950. array (
  951. 'pretty_version' => 'v5.4.36',
  952. 'version' => '5.4.36.0',
  953. 'aliases' =>
  954. array (
  955. ),
  956. 'reference' => 'a30f316214d908cf5874f700f3f3fb29ceee91ba',
  957. ),
  958. 'symfony/cache-contracts' =>
  959. array (
  960. 'pretty_version' => 'v2.5.2',
  961. 'version' => '2.5.2.0',
  962. 'aliases' =>
  963. array (
  964. ),
  965. 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc',
  966. ),
  967. 'symfony/cache-implementation' =>
  968. array (
  969. 'provided' =>
  970. array (
  971. 0 => '1.0|2.0',
  972. ),
  973. ),
  974. 'symfony/console' =>
  975. array (
  976. 'pretty_version' => 'v5.4.36',
  977. 'version' => '5.4.36.0',
  978. 'aliases' =>
  979. array (
  980. ),
  981. 'reference' => '39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e',
  982. ),
  983. 'symfony/css-selector' =>
  984. array (
  985. 'pretty_version' => 'v5.4.35',
  986. 'version' => '5.4.35.0',
  987. 'aliases' =>
  988. array (
  989. ),
  990. 'reference' => '9e615d367e2bed41f633abb383948c96a2dbbfae',
  991. ),
  992. 'symfony/deprecation-contracts' =>
  993. array (
  994. 'pretty_version' => 'v2.5.2',
  995. 'version' => '2.5.2.0',
  996. 'aliases' =>
  997. array (
  998. ),
  999. 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
  1000. ),
  1001. 'symfony/error-handler' =>
  1002. array (
  1003. 'pretty_version' => 'v5.4.36',
  1004. 'version' => '5.4.36.0',
  1005. 'aliases' =>
  1006. array (
  1007. ),
  1008. 'reference' => '90b1d7799bfc1b3ed5f902e8b334eeb7dba537a1',
  1009. ),
  1010. 'symfony/event-dispatcher' =>
  1011. array (
  1012. 'pretty_version' => 'v5.4.35',
  1013. 'version' => '5.4.35.0',
  1014. 'aliases' =>
  1015. array (
  1016. ),
  1017. 'reference' => '7a69a85c7ea5bdd1e875806a99c51a87d3a74b38',
  1018. ),
  1019. 'symfony/event-dispatcher-contracts' =>
  1020. array (
  1021. 'pretty_version' => 'v2.5.2',
  1022. 'version' => '2.5.2.0',
  1023. 'aliases' =>
  1024. array (
  1025. ),
  1026. 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1',
  1027. ),
  1028. 'symfony/event-dispatcher-implementation' =>
  1029. array (
  1030. 'provided' =>
  1031. array (
  1032. 0 => '2.0',
  1033. ),
  1034. ),
  1035. 'symfony/expression-language' =>
  1036. array (
  1037. 'pretty_version' => 'v5.4.35',
  1038. 'version' => '5.4.35.0',
  1039. 'aliases' =>
  1040. array (
  1041. ),
  1042. 'reference' => 'd59441c10a5a73cd9d4d778b8253595a16f6716d',
  1043. ),
  1044. 'symfony/finder' =>
  1045. array (
  1046. 'pretty_version' => 'v5.4.35',
  1047. 'version' => '5.4.35.0',
  1048. 'aliases' =>
  1049. array (
  1050. ),
  1051. 'reference' => 'abe6d6f77d9465fed3cd2d029b29d03b56b56435',
  1052. ),
  1053. 'symfony/http-foundation' =>
  1054. array (
  1055. 'pretty_version' => 'v5.4.35',
  1056. 'version' => '5.4.35.0',
  1057. 'aliases' =>
  1058. array (
  1059. ),
  1060. 'reference' => 'f2ab692a22aef1cd54beb893aa0068bdfb093928',
  1061. ),
  1062. 'symfony/http-kernel' =>
  1063. array (
  1064. 'pretty_version' => 'v5.4.37',
  1065. 'version' => '5.4.37.0',
  1066. 'aliases' =>
  1067. array (
  1068. ),
  1069. 'reference' => '4ef7ed872564852b3c6c15fecf492975a52cbff3',
  1070. ),
  1071. 'symfony/mime' =>
  1072. array (
  1073. 'pretty_version' => 'v5.4.35',
  1074. 'version' => '5.4.35.0',
  1075. 'aliases' =>
  1076. array (
  1077. ),
  1078. 'reference' => 'ee94d9b538f93abbbc1ee4ccff374593117b04a9',
  1079. ),
  1080. 'symfony/polyfill-ctype' =>
  1081. array (
  1082. 'pretty_version' => 'v1.29.0',
  1083. 'version' => '1.29.0.0',
  1084. 'aliases' =>
  1085. array (
  1086. ),
  1087. 'reference' => 'ef4d7e442ca910c4764bce785146269b30cb5fc4',
  1088. ),
  1089. 'symfony/polyfill-iconv' =>
  1090. array (
  1091. 'pretty_version' => 'v1.29.0',
  1092. 'version' => '1.29.0.0',
  1093. 'aliases' =>
  1094. array (
  1095. ),
  1096. 'reference' => 'cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f',
  1097. ),
  1098. 'symfony/polyfill-intl-grapheme' =>
  1099. array (
  1100. 'pretty_version' => 'v1.29.0',
  1101. 'version' => '1.29.0.0',
  1102. 'aliases' =>
  1103. array (
  1104. ),
  1105. 'reference' => '32a9da87d7b3245e09ac426c83d334ae9f06f80f',
  1106. ),
  1107. 'symfony/polyfill-intl-idn' =>
  1108. array (
  1109. 'pretty_version' => 'v1.29.0',
  1110. 'version' => '1.29.0.0',
  1111. 'aliases' =>
  1112. array (
  1113. ),
  1114. 'reference' => 'a287ed7475f85bf6f61890146edbc932c0fff919',
  1115. ),
  1116. 'symfony/polyfill-intl-normalizer' =>
  1117. array (
  1118. 'pretty_version' => 'v1.29.0',
  1119. 'version' => '1.29.0.0',
  1120. 'aliases' =>
  1121. array (
  1122. ),
  1123. 'reference' => 'bc45c394692b948b4d383a08d7753968bed9a83d',
  1124. ),
  1125. 'symfony/polyfill-mbstring' =>
  1126. array (
  1127. 'pretty_version' => 'v1.29.0',
  1128. 'version' => '1.29.0.0',
  1129. 'aliases' =>
  1130. array (
  1131. ),
  1132. 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec',
  1133. ),
  1134. 'symfony/polyfill-php72' =>
  1135. array (
  1136. 'pretty_version' => 'v1.29.0',
  1137. 'version' => '1.29.0.0',
  1138. 'aliases' =>
  1139. array (
  1140. ),
  1141. 'reference' => '861391a8da9a04cbad2d232ddd9e4893220d6e25',
  1142. ),
  1143. 'symfony/polyfill-php73' =>
  1144. array (
  1145. 'pretty_version' => 'v1.29.0',
  1146. 'version' => '1.29.0.0',
  1147. 'aliases' =>
  1148. array (
  1149. ),
  1150. 'reference' => '21bd091060673a1177ae842c0ef8fe30893114d2',
  1151. ),
  1152. 'symfony/polyfill-php80' =>
  1153. array (
  1154. 'pretty_version' => 'v1.29.0',
  1155. 'version' => '1.29.0.0',
  1156. 'aliases' =>
  1157. array (
  1158. ),
  1159. 'reference' => '87b68208d5c1188808dd7839ee1e6c8ec3b02f1b',
  1160. ),
  1161. 'symfony/polyfill-php81' =>
  1162. array (
  1163. 'pretty_version' => 'v1.29.0',
  1164. 'version' => '1.29.0.0',
  1165. 'aliases' =>
  1166. array (
  1167. ),
  1168. 'reference' => 'c565ad1e63f30e7477fc40738343c62b40bc672d',
  1169. ),
  1170. 'symfony/process' =>
  1171. array (
  1172. 'pretty_version' => 'v5.4.36',
  1173. 'version' => '5.4.36.0',
  1174. 'aliases' =>
  1175. array (
  1176. ),
  1177. 'reference' => '4fdf34004f149cc20b2f51d7d119aa500caad975',
  1178. ),
  1179. 'symfony/routing' =>
  1180. array (
  1181. 'pretty_version' => 'v5.4.37',
  1182. 'version' => '5.4.37.0',
  1183. 'aliases' =>
  1184. array (
  1185. ),
  1186. 'reference' => '48ae43e443693ddb4e574f7c12f0d17ce287694e',
  1187. ),
  1188. 'symfony/service-contracts' =>
  1189. array (
  1190. 'pretty_version' => 'v2.5.2',
  1191. 'version' => '2.5.2.0',
  1192. 'aliases' =>
  1193. array (
  1194. ),
  1195. 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c',
  1196. ),
  1197. 'symfony/string' =>
  1198. array (
  1199. 'pretty_version' => 'v5.4.36',
  1200. 'version' => '5.4.36.0',
  1201. 'aliases' =>
  1202. array (
  1203. ),
  1204. 'reference' => '4e232c83622bd8cd32b794216aa29d0d266d353b',
  1205. ),
  1206. 'symfony/translation' =>
  1207. array (
  1208. 'pretty_version' => 'v5.4.35',
  1209. 'version' => '5.4.35.0',
  1210. 'aliases' =>
  1211. array (
  1212. ),
  1213. 'reference' => '77d7d1e46f52827585e65e6cd6f52a2542e59c72',
  1214. ),
  1215. 'symfony/translation-contracts' =>
  1216. array (
  1217. 'pretty_version' => 'v2.5.2',
  1218. 'version' => '2.5.2.0',
  1219. 'aliases' =>
  1220. array (
  1221. ),
  1222. 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe',
  1223. ),
  1224. 'symfony/translation-implementation' =>
  1225. array (
  1226. 'provided' =>
  1227. array (
  1228. 0 => '2.3',
  1229. ),
  1230. ),
  1231. 'symfony/var-dumper' =>
  1232. array (
  1233. 'pretty_version' => 'v5.4.36',
  1234. 'version' => '5.4.36.0',
  1235. 'aliases' =>
  1236. array (
  1237. ),
  1238. 'reference' => '2e9c2b11267119d9c90d6b3fdce5e4e9f15e2e90',
  1239. ),
  1240. 'symfony/var-exporter' =>
  1241. array (
  1242. 'pretty_version' => 'v5.4.35',
  1243. 'version' => '5.4.35.0',
  1244. 'aliases' =>
  1245. array (
  1246. ),
  1247. 'reference' => 'abb0a151b62d6b07e816487e20040464af96cae7',
  1248. ),
  1249. 'tijsverkoyen/css-to-inline-styles' =>
  1250. array (
  1251. 'pretty_version' => 'v2.2.7',
  1252. 'version' => '2.2.7.0',
  1253. 'aliases' =>
  1254. array (
  1255. ),
  1256. 'reference' => '83ee6f38df0a63106a9e4536e3060458b74ccedb',
  1257. ),
  1258. 'vlucas/phpdotenv' =>
  1259. array (
  1260. 'pretty_version' => 'v5.6.0',
  1261. 'version' => '5.6.0.0',
  1262. 'aliases' =>
  1263. array (
  1264. ),
  1265. 'reference' => '2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4',
  1266. ),
  1267. 'voku/portable-ascii' =>
  1268. array (
  1269. 'pretty_version' => '1.6.1',
  1270. 'version' => '1.6.1.0',
  1271. 'aliases' =>
  1272. array (
  1273. ),
  1274. 'reference' => '87337c91b9dfacee02452244ee14ab3c43bc485a',
  1275. ),
  1276. 'webmozart/assert' =>
  1277. array (
  1278. 'pretty_version' => '1.11.0',
  1279. 'version' => '1.11.0.0',
  1280. 'aliases' =>
  1281. array (
  1282. ),
  1283. 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
  1284. ),
  1285. ),
  1286. );
  1287. private static $canGetVendors;
  1288. private static $installedByVendor = array();
  1289. public static function getInstalledPackages()
  1290. {
  1291. $packages = array();
  1292. foreach (self::getInstalled() as $installed) {
  1293. $packages[] = array_keys($installed['versions']);
  1294. }
  1295. if (1 === \count($packages)) {
  1296. return $packages[0];
  1297. }
  1298. return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
  1299. }
  1300. public static function isInstalled($packageName)
  1301. {
  1302. foreach (self::getInstalled() as $installed) {
  1303. if (isset($installed['versions'][$packageName])) {
  1304. return true;
  1305. }
  1306. }
  1307. return false;
  1308. }
  1309. public static function satisfies(VersionParser $parser, $packageName, $constraint)
  1310. {
  1311. $constraint = $parser->parseConstraints($constraint);
  1312. $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
  1313. return $provided->matches($constraint);
  1314. }
  1315. public static function getVersionRanges($packageName)
  1316. {
  1317. foreach (self::getInstalled() as $installed) {
  1318. if (!isset($installed['versions'][$packageName])) {
  1319. continue;
  1320. }
  1321. $ranges = array();
  1322. if (isset($installed['versions'][$packageName]['pretty_version'])) {
  1323. $ranges[] = $installed['versions'][$packageName]['pretty_version'];
  1324. }
  1325. if (array_key_exists('aliases', $installed['versions'][$packageName])) {
  1326. $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
  1327. }
  1328. if (array_key_exists('replaced', $installed['versions'][$packageName])) {
  1329. $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
  1330. }
  1331. if (array_key_exists('provided', $installed['versions'][$packageName])) {
  1332. $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
  1333. }
  1334. return implode(' || ', $ranges);
  1335. }
  1336. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1337. }
  1338. public static function getVersion($packageName)
  1339. {
  1340. foreach (self::getInstalled() as $installed) {
  1341. if (!isset($installed['versions'][$packageName])) {
  1342. continue;
  1343. }
  1344. if (!isset($installed['versions'][$packageName]['version'])) {
  1345. return null;
  1346. }
  1347. return $installed['versions'][$packageName]['version'];
  1348. }
  1349. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1350. }
  1351. public static function getPrettyVersion($packageName)
  1352. {
  1353. foreach (self::getInstalled() as $installed) {
  1354. if (!isset($installed['versions'][$packageName])) {
  1355. continue;
  1356. }
  1357. if (!isset($installed['versions'][$packageName]['pretty_version'])) {
  1358. return null;
  1359. }
  1360. return $installed['versions'][$packageName]['pretty_version'];
  1361. }
  1362. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1363. }
  1364. public static function getReference($packageName)
  1365. {
  1366. foreach (self::getInstalled() as $installed) {
  1367. if (!isset($installed['versions'][$packageName])) {
  1368. continue;
  1369. }
  1370. if (!isset($installed['versions'][$packageName]['reference'])) {
  1371. return null;
  1372. }
  1373. return $installed['versions'][$packageName]['reference'];
  1374. }
  1375. throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
  1376. }
  1377. public static function getRootPackage()
  1378. {
  1379. $installed = self::getInstalled();
  1380. return $installed[0]['root'];
  1381. }
  1382. public static function getRawData()
  1383. {
  1384. @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);
  1385. return self::$installed;
  1386. }
  1387. public static function getAllRawData()
  1388. {
  1389. return self::getInstalled();
  1390. }
  1391. public static function reload($data)
  1392. {
  1393. self::$installed = $data;
  1394. self::$installedByVendor = array();
  1395. }
  1396. private static function getInstalled()
  1397. {
  1398. if (null === self::$canGetVendors) {
  1399. self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
  1400. }
  1401. $installed = array();
  1402. if (self::$canGetVendors) {
  1403. foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
  1404. if (isset(self::$installedByVendor[$vendorDir])) {
  1405. $installed[] = self::$installedByVendor[$vendorDir];
  1406. } elseif (is_file($vendorDir.'/composer/installed.php')) {
  1407. $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
  1408. }
  1409. }
  1410. }
  1411. $installed[] = self::$installed;
  1412. return $installed;
  1413. }
  1414. }