我开发了一个库,我决定把它扔给包装师。我的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
,我都会收到以下错误:
您的要求无法解决为一组可安装的软件包。
问题 1 - 在任何版本中都找不到请求的包 kamranahmedse/php-geocode,包名可能有拼写错误。
谁能看看我在这里做错了什么?我一直在尝试,但找不到任何错误,因为这将是我第一个通过 packagegist 打包的包,而且我之前没有经验。