2012-08-15 4 views
0

Symfony2 프로젝트에 OSExcelBundle 플러그인을 통합하려고합니다. 나는 README 튜토리얼을 따라 언급하는 한 내가 http://www.getcomposer.org에서 작곡가를 다운로드했던 PHP를 명령 줄을 실행하고 번들 내에서 실행 파일을 배치 할 수있을 수 있도록하기 위해symfony2 OSExcelBundle 번들을 설치할 수 없습니다.

Add this line to the require option in your composer.json file: 

"os/excel-bundle": "dev-master" 

Add autoloader for PHPExcel in app/autoloader.php 

require __DIR__.'/../vendor/os/php-excel/PHPExcel/PHPExcel.php'; 

Execute this command line 

php composer.phar install 

다음과 같습니다. 내가 그것을 실행하면, 내가 여기

Your requirements could not be resolved to an installable set of packages. 

Problem 1 
- Installation request for os/excel-bundle == 1.0.0.0 -> satisfiable by os/excel-bundle 1.0.0. 
- Can only install one of: os/excel-bundle dev-master, os/excel-bundle 1.0.0. 
- Installation request for os/excel-bundle dev-master -> satisfiable by os/excel-bundle dev-master. 

내가 symfony2 플러그인

1을 설치하기 위해 겪고 있었어요 다른 단계는 다음과 같은 오류를 가지고 - 나는 공급 업체/번들 플러그인 배치 디렉토리는 다음 경로

vendor/bundle/OS/ExcelBundle 

이 일치 - 그래서 나는/AppKernel.php이 파일을 응용 프로그램에이 줄을 추가 한

new OS\ExcelBundle\OSExcelBundle(), 

3 - 나는

가 여기에 JSON이

{ 
    "name": "os/excel-bundle", 
    "description": "OS Excel Bundle for Symfony2", 
    "keywords": ["excel"], 
    "homepage": "http://github.com/ouardisoft/OSExcelBundle", 
    "type": "symfony-bundle", 
    "license": "MIT", 
    "authors": [ 
    { 
     "name": "LOUARDI Abdeltif", 
     "email": "[email protected]", 
     "homepage": "http://phphub.net" 
    } 
    ], 
    "require": { 
    "php": ">=5.2.6", 
    "os/php-excel": "dev-master", 
    "os/excel-bundle": "dev-master" 
    }, 
    "autoload": { 
     "psr-0": { "OS\\ExcelBundle": "" } 
    }, 
    "target-dir": "OS/ExcelBundle" 
} 
+0

os/excel-bundle은 composer.json 파일에 몇 번 표시됩니까? – wgcrouch

+0

2 번 여기. Json을 추가하려고합니다. – iwooli

+0

번들을위한 작곡가 파일처럼 보입니다. 프로젝트의 파일은 무엇을 말합니까 (가지고 있습니까?)? 2.0 버전이나 2.1 버전을 사용중인 Symfony의 버전은 무엇입니까? Symfony 2.0 표준 버전은 Composer를 사용하지 않으며, deps 파일을 사용합니다. – wgcrouch

답변

0

심포니 2.0 표준 에디션 나던 사용 작곡가, 그것은 deps 파일 및 공급 업체 스크립트를 사용하는 것입니다 위의 README를 따랐다. Read through this

공급 업체 라이브러리에 프로젝트 deps 파일을 추가하고 php bin/vendors install을 실행하여 공급 업체 폴더에 설치해야합니다.

또는 2.1로 업그레이드하고 Composer를 사용할 수 있습니다.

+0

작곡가와 함께 제공되는 2.1 버전을 설치하는 옵션을 선택했습니다. 나는 같은 과정을 통해 다시 가고 있지만 결국 나는 같은 문제가있다. 그럼에도 불구하고 문제는 내가 "os/excel-bundle": readme가 제안하는대로 json에 "dev-master"행을 포함한다는 사실에서 알 수 있습니다. 이 줄이 없기 때문에 작곡가는 잘 돌아갑니다. 그리고이 줄이 얼마나 중요한지 모르겠으므로 플러그인이 제대로 작동하는지 확신 할 수 없습니다. 시도해! – iwooli

관련 문제