File tree Expand file tree Collapse file tree 3 files changed +8
-40
lines changed
resources/js/components/Repository
src/Http/Controllers/Api/Repositories Expand file tree Collapse file tree 3 files changed +8
-40
lines changed Original file line number Diff line number Diff line change 4141 "php" : " ^7.1.3" ,
4242 "ext-json" : " *" ,
4343 "illuminate/support" : " 5.6.*|5.7.*|5.8.*|^6.0" ,
44- "mcstreetguy/composer-parser" : " ^1.0. 1"
44+ "mcstreetguy/composer-parser" : " ^1.1"
4545 },
4646 "require-dev" : {
4747 "friendsofphp/php-cs-fixer" : " ^2.10" ,
Original file line number Diff line number Diff line change 11<template >
22 <div >
3- <span
4- class =" bg-gray-200 border-b-2 border-gray-400 px-2 py-1 text-sm font-semibold font-mono tracking-wide text-gray-700 mr-2"
5- v-text =" type"
6- ></span >
7- <span v-text =" getTitle()" ></span >
3+ <div >
4+ <span
5+ class =" bg-gray-200 border-b-2 border-gray-400 px-2 py-1 text-sm font-semibold font-mono tracking-wide text-gray-700 mr-2"
6+ v-text =" type"
7+ ></span >
8+ <span v-text =" getTitle()" ></span >
9+ </div >
810 <div >
911 <div v-for =" (option, optionName) in options" >
1012 <div v-if =" typeof option === 'object'" v-for =" (optionValue, optionKey) in option" class =" text-sm mt-4" >
Original file line number Diff line number Diff line change @@ -43,40 +43,6 @@ private function getRepositories(): array
4343 ];
4444 }
4545
46- $ output = $ this ->addDefaultRepository ($ output );
47-
4846 return $ output ;
4947 }
50-
51- // TODO: Remove after fix: https://github.com/MCStreetguy/ComposerParser/issues/4
52- private function addDefaultRepository (array $ repositories ): array
53- {
54- $ isPackagistOrgDisabled = false ;
55- foreach ($ repositories as $ key => $ repository ) {
56- // This hacky temporary solution the only way to determine `{"packagist.org": false}` repository object
57- // But in fact it will display that packagist ignored even with any empty object
58- if ($ repository ['type ' ] === '' && $ repository ['url ' ] === '' && $ repository ['options ' ] === [] && is_null ($ repository ['package ' ])) {
59- $ isPackagistOrgDisabled = true ;
60- unset($ repositories [$ key ]);
61- }
62- }
63-
64- if ($ isPackagistOrgDisabled ) {
65- return $ repositories ;
66- }
67-
68- $ defaultRepository = [
69- 'type ' => 'composer ' ,
70- 'url ' => 'https?://repo.packagist.org ' ,
71- 'allow_ssl_downgrade ' => true ,
72- ];
73-
74- if (!isset ($ repositories ['packagist.org ' ])) {
75- $ repositories ['packagist.org ' ] = [];
76- }
77-
78- $ repositories ['packagist.org ' ] = array_merge ($ defaultRepository , $ repositories ['packagist.org ' ]);
79-
80- return $ repositories ;
81- }
8248}
You can’t perform that action at this time.
0 commit comments