2013-03-18 26 views
5

我想使用Composer來包含php readability git項目。這是我composer.json文件:使用Composer獲取Kohana的github回購失敗:「找不到請求的包」

{ 
    "repositories": [ 
     { 
      "type": "package", 
      "package": { 
       "name": "php-readability/php-readability", 
       "version": "master", 
       "source": { 
        "url": "https://github.com/feelinglucky/php-readability.git", 
        "type": "git", 
        "reference": "branches/master" 
       } 
      } 
     } 
    ], 
    "require": { 
     "php-readability/php-readability": "master" 
    } 
} 

我得到的錯誤是:

Problem 1 
- The requested package php-readability/php-readability master could not be found. 

Potential causes: 
- A typo in the package name 
- The package is not available in a stable-enough version according to your min 
imum-stability setting 
    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f 
or more details. 

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common 
problems. 

這是我第一次用作曲因此很可能我的配置是錯誤的!

回答

10

php-readability項目沒有標籤(所以在作曲家方面它不穩定)。默認情況下只考慮穩定的軟件包。

要指示您想要安裝軟件包的開發版本,請將其版本定義爲「dev-master」或「* @ dev」。

另外,您在存儲庫定義中給出了錯誤的引用。這裏有一個工作composer.json

{ 
    "repositories": [ 
     { 
      "type": "package", 
      "package": { 
       "name": "php-readability/php-readability", 
       "version": "master", 
       "source": { 
        "url": "https://github.com/feelinglucky/php-readability.git", 
        "type": "git", 
        "reference": "master" 
       } 
      } 
     } 
    ], 
    "require": { 
     "php-readability/php-readability": "dev-master" 
    } 
} 
+0

謝謝,男人! – 2014-02-21 22:27:39

相關問題