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"
}
os/excel-bundle은 composer.json 파일에 몇 번 표시됩니까? – wgcrouch
2 번 여기. Json을 추가하려고합니다. – iwooli
번들을위한 작곡가 파일처럼 보입니다. 프로젝트의 파일은 무엇을 말합니까 (가지고 있습니까?)? 2.0 버전이나 2.1 버전을 사용중인 Symfony의 버전은 무엇입니까? Symfony 2.0 표준 버전은 Composer를 사용하지 않으며, deps 파일을 사용합니다. – wgcrouch