为什么 Symfony Flex 将自己的 "dev-develop" 包添加到 composer.json 中的根级别?
Why does Symfony Flex adds own "dev-develop" bundles to root level in composer.json?
我有一个很大的 Symfony 项目并开始将代码外包给独立的包。这很有魅力。
但我意识到 composer.json 在执行作曲家更新后包含 "weird" 根级别的信息:
这就是我要求的原因:
"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 默认行为?这些额外信息的用途是什么?
提前致谢!
它发现有一个错误,当你重命名 composer.json 这样:composer-dev.json
Symfony Flex 的 symfony.lock 文件有一个 str_replace。
但是以这种方式重命名自定义 composer.json:dev-composer.json
有效。
我有一个很大的 Symfony 项目并开始将代码外包给独立的包。这很有魅力。
但我意识到 composer.json 在执行作曲家更新后包含 "weird" 根级别的信息:
这就是我要求的原因:
"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 默认行为?这些额外信息的用途是什么?
提前致谢!
它发现有一个错误,当你重命名 composer.json 这样:composer-dev.json
Symfony Flex 的 symfony.lock 文件有一个 str_replace。
但是以这种方式重命名自定义 composer.json:dev-composer.json
有效。