2014-10-07 1 views
0

나는 라이브러리를 개발했고 그것을 packagist에게 던지기로 결정했다. 내 composer.json 다음과 같은packagist를 통해 내 패키지를 다운로드 할 수없는 이유는 무엇입니까?

{ 
    "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에서 내 패키지를 호스팅하고 관련 자식 저장소는 https://github.com/kamranahmedse/php-geocode입니다. 이제는 내 패키지가 제대로 작동하는지 테스트하려면, 내가 한 것은 폴더를 만드는 것입니다. 그 폴더 안에 나는

{ 
    "require": { 
     "kamranahmedse/php-geocode": "*" 
    } 
} 

을 포함하는이 간단한 composer.json 파일을 생성하지만 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.

사람은 모양과 무엇을 참조하십시오 수를 I 내가 여기서 잘못하고있는거야? 나는 노력과 노력을했지만 오류를 발견 할 수 없기 때문에 이것은 packagist에 대한 첫 번째 패키지가 될 것이며 이전의 경험이 없습니다.

+0

'작곡가는 "kamranahmedse/php-geocode = dev-master"를 요구합니다. 개발 마스터 브랜치를 가져와야하고 태그 나 릴리즈가 없습니다. –

답변

6

안정 버전이 없기 때문에 작성자는 *가 지정되면 안정 버전을 다운로드하는 것으로 기본 설정됩니다.

버전 사양을 dev-master으로 변경하거나 minimum-stabilitydev으로 설정하십시오.

+2

정답은 대신 버전에 태그를 지정하는 것입니다. 지점에 대한 작업은 모든 사람들에게 고통이며, Stackoverflow는 태그가있는 버전을 사용할 수 없다는 부작용을 다루는 질문으로 가득 차 있습니다. – Sven

+1

@Sven 필자는 'composer.lock' 파일을 이해하고 사용하는 한 프로젝트의 초기 단계 또는 실험적인 방식으로 지점에서 작업하는 것이 좋다고 생각합니다. –

관련 문제