我有一个很大的 Symfony 项目并开始将代码外包给独立的包。这就像魅力一样。
但我已经意识到 composer.json 在执行作曲家更新后在根级别包含“奇怪”的信息:
这就是我要求的原因:
"customer/base-bundle": {
"version": "dev-develop"
},
"customer/a-bundle": {
"version": "dev-develop"
},
"customer/b-bundle": {
"version": "dev-develop"
},
"customer/c-bundle": {
"version": "dev-develop"
},
"symfony/polyfill-intl-idn": {
"version": "v1.11.0"
},
这是 composer.json 中的常规配置:
"repositories": {
"base-bundle": {
"type": "vcs",
"url": "git@git.example.com:customer-shared/base-bundle.git"
},
"a-bundle": {
"type": "vcs",
"url": "git@git.example.com:customer-shared/a-bundle.git"
},
"b-bundle": {
"type": "vcs",
"url": "git@git.example.com:customer-shared/b-bundle.git"
},
"c-bundle": {
"type": "vcs",
"url": "git@git.pixelpark.com:customer-shared/c-bundle.git"
}
},
"require": {
// ...
"customer/base-bundle": "dev-develop",
"customer/a-bundle": "dev-develop",
"customer/b-bundle": "dev-develop",
"customer/c-bundle": "dev-develop"
}
存储库和要求部分很好。我只是不知道为什么它将“dev-develop”包(和 symfony/polyfill-intl-idn 包)分别添加到 composer.json 的根目录。
这是 Symfony/Flex 行为还是 Composer 的默认行为?这些额外的信息用于什么目的?
提前致谢!