2012-08-22 2 views
1

ZF2 ZendRest module을 설치하고 싶습니다.zf2에 ZendRest 모듈을 설치하는 방법은 무엇입니까?

설치 방법은 무엇입니까?

내가 \ 업체 \의 zendrest에

php .\composer.phar 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 zendframework/zend-http 1.0.0 could not be found. 
    Problem 2 
- The requested package zendframework/zend-uri 1.0.0 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 minimum- stability setting 
    see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details. 

어디에서 ZendRest 폴더를 넣어야합니까?

감사합니다.

+0

'composer.json' 파일을 게시 할 수 있습니까? – Florent

+0

여기에 제공된 composer.json을 사용했습니다. https://github.com/zendframework/ZendRest/blob/master/composer.json – Dionysos

+0

작곡가의 작품이 아닙니다! 자신 만의'composer.json'을 만들고'zendframework/zendrest'에 의존성을 추가해야합니다. – Florent

답변

2

ZendRest 종속성에 대한 안정 버전은 없습니다 : zend-http 및 zend-uri (기존 버전의 경우 show 출력 참조). 작곡가은 안정 패키지 (기본값 :)을 사용합니다. 그래서이 패키지를 설치할 수 없습니다.

$ composer show zendframework/zend-http 
name  : zendframework/zend-http 
descrip. : provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests 
keywords : zf2, http 
versions : 2.0.0rc4, 2.0.0rc3, 2.0.0rc2, 2.0.0-rc1, 2.0.0-beta5, 2.0.0-beta4 
type  : library 
... 

당신은 당신의 프로젝트에 devminimum-stability을 변경해야합니다 :

{ 
    "require": { 
     // ... 
    }, 
    "minimum-stability": "dev" 
} 

편집 : 예를 들어 다음 composer.json 작품. 이것은 당신 자신의 프로젝트에 있어야합니다 (더 많은 의존성을 가지고 있습니다) :

{ 
    "require": { 
     "zendframework/zend-rest": "*" 
    }, 
    "repositories": [ 
     { 
      "type": "composer", 
      "url": "http://packages.zendframework.com/" 
     } 
    ], 
    "minimum-stability": "dev" 
} 
+0

좋은 대답이지만 오타가 있습니다. 'composer.json'의''zendframework/zendrest ''가 하이픈없이 사용되어야합니다. – Patito