我開發了一個庫,我決定把它扔給packagist。我composer.json
如下所示爲什麼我無法通過包裝商下載我的包裝?
{
"name": "kamranahmedse/php-geocode",
"type": "library",
"description": "A wrapper around the Google Geocoding API to get different details such as latitude, longitude, country, city, district, postcode, town and street number regarding some specific address.",
"keywords": ["location", "address", "addresses", "google", "map", "maps", "gmap", "gmaps", "geocode", "geocoder", "geocoding"],
"homepage": "https://github.com/kamranahmedse/php-geocode",
"license": "MIT",
"authors": [
{
"name": "Kamran Ahmed",
"homepage": "http://kamranahmed.info",
"role": "Developer"
}
],
"autoload": {
"psr-0": {
"Geocode": "src/"
}
},
"require": {
"php": ">=5.2.0"
}
}
和我主持我的包在https://packagist.org/packages/kamranahmedse/php-geocode和相關的Git倉庫,https://github.com/kamranahmedse/php-geocode。現在爲了測試我的包是否工作正常,我所做的是創建一個文件夾。這個文件夾裏我創造了這個簡單的composer.json
文件,其中包含
{
"require": {
"kamranahmedse/php-geocode": "*"
}
}
但每當我嘗試運行composer install
,我發現了以下錯誤:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - The requested package kamranahmedse/php-geocode could not be found in any version, there may be a typo in the package name.
任何人都可以請看看,看看我在這裏做錯了嗎?我一直在努力嘗試,但無法找到任何錯誤,因爲這將是我對packagist的第一個包,而且我沒有任何經驗。
'composer require「kamranahmedse/php-geocode = dev-master」'。您需要獲取開發主分支,您沒有標籤或版本。 – 2014-10-07 12:29:48