problems with composer !

Hello Guys ,
 It's 3rd week of our project time line and still we are facing some conflicts between two SilverStripe gsoc project ( one is mine and other one is Andrew's) . so lets go through this and give me your feedbacks to overcome these problems .  
our primary task for first week was to fetch modules data from different repository save content of json into database (there is so many useful meta data which will later use on detailed page of modules ).

what I did : created a simple silverstripe form took URL of repo , using this url created clone of that module on my server. fetched composer.json file and content of json stored in database. it also need some finishing as suggested by Ingo (should be independent of repository type and create test for this).

Andrew's suggestion : He suggested that we could use Composer itself for fetching these data.

for implementing Andrew's suggestion I tried following thing --

method 1- 
 use packagist code and create an instant of packagist.org with silverstripe .
Problem :
 packagist code is symfony based and I couldn't find any way to integrate it with silverstripe. even Seldaek (lead developer of composer) himself told me that it is not possible.

method 2-
Use packagist.org for fetching all module data . i.e.
"composer create-project silverstripe/composer-installer testA "
then it will search "silverstripe/composer-installer" project on packagist.org.

Problem : 
1 - Every project should be available on packagist.org . we can pass link to external repository but in my case its not working because many git repositories don't allow reading url directly .
2 - If we are using composer then it is also fetching all the dependent modules and I couldn't find any way to stop this (handling data of those dependent modules simultaneously is very tedious task ) . 

Conclusion :  
1- We only need Composer.json file for getting metadata about modules no matters how it fetched from module so I am not able to understand how it will effect me if I will not use composer for fetching this composer.json
2- According to my research method 2 is working just like my way of  implementation . its sending module name to packagist.org searching the module on packagist.org cloning into my server reading the json file and installing dependencies defined in composer.json file (installing dependencies is not required for my project).
                       so i think we should keep going with my way ?

That is all , may be I am wrong at some point please let me know about it and please give your feedbacks.



 

No comments on "problems with composer !"

Leave a Reply