【发布时间】:2017-04-01 03:13:54
【问题描述】:
我已经通过 generator 命令创建了一个 symfony 2.7 包,它是在 src/Bundle/bundlename 下生成的,但是我想通过 composer 使用这个包以便能够在另一个项目中使用它,然后我移动了包文件为包创建了 composer.json
{
"name" : "extremesolution/payment-handler-vodafone-bundle",
"type" : "symfony-bundle",
"description": "Vodafone Redpoints Payment Handler Bundle",
"authors": [
{
"name": "Hazem Taha",
"email": "hazem.taha@extremesolution.com"
}
],
"require" : {
"php": "^5.5"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"autoload" : {
"psr-4" : {
"Extremesolution\\Bundle\\ExtremesolutionPaymentHandlerVodafoneBundle\\" : ""
}
}
}
并将其推送到 bitbucket 私有仓库,并在我的项目 composer.json 中需要捆绑包,并提供存储库 url 并在 AppKernel.php 中注册捆绑包
新的 Extremesolution\Bundle\PaymentHandlerVodafoneBundle\ExtremesolutionPaymentHandlerVodafoneBundle()
但是,每当我运行 composer update 时,我都会得到
[运行时异常]
执行“'cache:clear --no-warmup'”命令时出错:
致命错误:在 /home/kan/symfony_ 中找不到类“Extremesolution\Bundle\PaymentHandlerVodafoneBundle\ExtremesolutionPaymentHandlerVodafoneBundle”
第 25 行的试验/付款示例/app/AppKernel.php
PHP 致命错误:在 /home/kan/sym 中找不到类“Extremesolution\Bundle\PaymentHandlerVodafoneBundle\ExtremesolutionPaymentHandlerVodafoneBundle”
fony_trials/payment-example/app/AppKernel.php 第 25 行
.
我通过 phpbrew、composer 版本 1.2.1 和 symfony 2.7 使用 php 版本 5.5.38
我错过了什么吗?是否有要通过 composer 使用的捆绑包的自定义配置?
【问题讨论】: