我们有 composer 作为我们的依赖注入(inject)框架,它将引入我们创建的库 foobar,它工作正常。库 foobar 有 14 个版本 v1.1.1 -> v1.1.14。一直到 .12 Composer 更新了应用程序。但是现在我们得到了这个错误:
Update failed (Source directory /home/username/dev/git/appname/vendor/foorbar/library has unpushed changes on the current branch:
Branch v1.1.14 could not be found on the origin remote and appears to be unpushed)
composer.json
:{
"name": "App",
"description": "Foo Bar",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.2.",
"foobarzf2lib/library": "v1.1."
},
"minimum-stability": "stable",
"repositories": [
{
"type": "package",
"package": {
"name": "foobarzf2lib/library",
"version": "v1.1.14",
"source": {
"url": "https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/foobarzf2lib",
"type": "git",
"reference": "test"
},
"autoload": {
"psr-4": {
"FooBar\\" : "FooBar/"
}
}
}
}
]
}
更多信息:$ composer.phar clearcache
. 最佳答案
删除供应商文件夹并重新安装软件包。
关于php - 由于当前分支的更改,Composer 不会更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47416107/