niedziela, 9 grudnia 2012

Symfony2 + Composer + twitter/bootstrap dependency problem

Today I started my playground with Symfony 2. As it uses Composer as dependency manager -which I have also never used before - I realised that it's gonna be workful weekend.

After almost 2 hours of fightining with twitter/bootstrap package not found error:
 PS D:\Projects\symfony> composer install  
 Loading composer repositories with package information  
 Installing dependencies  
 Your requirements could not be resolved to an installable set of packages.  
  Problem 1  
   - The requested package twitter/bootstrap could not be found in any version, there may be a typo in the package name  
 .  
 Potential causes:  
  - A typo in the package name  
  - The package is not available in a stable-enough version according to your minimum-stability setting  
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.  
 Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.  

trying different configurations of composer.json, crawling millions of issues & forums finally I came to solution, which worked:
Repository:

 "repositories": [  
           {  
                "type": "package",  
                "package": {  
                     "version": "master",  
                     "name": "twitter/bootstrap",  
                     "source": {  
                          "url": "https://github.com/twitter/bootstrap.git",  
                          "type": "git",  
                          "reference": "master"  
                     },  
                     "dist": {  
                          "url": "https://github.com/twitter/bootstrap/zipball/master",  
                          "type": "zip"  
                     }  
                }  
           }  
      ],  

require:
 "twitter/bootstrap": "dev-master"  
Hope that this will save someone's time in the future (or mine, if I will forget).

Brak komentarzy:

Prześlij komentarz