Php Composer-安装github分叉/分支
为什么composer无法从安装分支 My composer.json:Php Composer-安装github分叉/分支,php,symfony,doctrine,composer-php,doctrine-migrations,Php,Symfony,Doctrine,Composer Php,Doctrine Migrations,为什么composer无法从安装分支 My composer.json: "repositories": [ { "type":"package", "package": { "name": "doctrine/doctrine-migrations-bundle", "version":"master", "source": { "url": "https://git
"repositories": [
{
"type":"package",
"package": {
"name": "doctrine/doctrine-migrations-bundle",
"version":"master",
"source": {
"url": "https://github.com/wimvds/DoctrineMigrationsBundle.git",
"type": "git",
"reference":"master"
}
}
}
],
"require": {
(...)
"doctrine/migrations": "1.0.*@dev",
"doctrine/doctrine-migrations-bundle": "dev-feature/multiple-em-support",
(...)
}.
错误:
composer update
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package doctrine/doctrine-migrations-bundle dev-feature/multiple-em-support 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.
试试这个
"repositories": [
{
"source": {
"url": "https://github.com/wimvds/DoctrineMigrationsBundle",
"type": "git",
}
}
}
],
"require": {
(...)
"doctrine/migrations": "1.0.*@dev",
"doctrine/doctrine-migrations-bundle": "dev-feature/multiple-em-support",
(...)
}
可能的重复只是说“必须定义一个类型”。我认为“类型”不能在“源”中?只是给那些仍然有问题的人的一个提示。注意分支名称前面的
dev-
。这不是分支名称的一部分,而是作曲家如何知道它是分支而不是标记版本。这是一个重要的注意事项!谢谢
"repositories": [
{
"source": {
"url": "https://github.com/wimvds/DoctrineMigrationsBundle",
"type": "git",
}
}
}
],
"require": {
(...)
"doctrine/migrations": "1.0.*@dev",
"doctrine/doctrine-migrations-bundle": "dev-feature/multiple-em-support",
(...)
}