简体   繁体   English

为什么Symfony Flex在composer.json的根目录级别添加自己的“ dev-develop”捆绑包?

[英]Why does Symfony Flex adds own “dev-develop” bundles to root level in composer.json?

I've got a big Symfony project and started to outsource code to standalone bundles. 我有一个很大的Symfony项目,并开始将代码外包到独立的包中。 This works like charm. 这就像魅力。

But I've realized that the composer.json contains "weird" infos on root level, after performing a composer update: 但是在执行作曲家更新后,我意识到composer.json在根级别包含“怪异”信息:

This is why what I'm asking for: 这就是为什么我要的是:

    "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"
    },

This is the regular config in composer.json: 这是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"
    }

The repositories and require section is fine. 存储库和require部分很好。 I just don't know why it adds the "dev-develop" packages (and the symfony/polyfill-intl-idn package) separately to composer.json's root. 我只是不知道为什么要在composer.json的根目录中分别添加“ dev-develop”包(和symfony / polyfill-intl-idn包)。

Is this Symfony/Flex behaviour or Composer default? 这是Symfony / Flex行为还是Composer的默认行为? And for what is this extra information used? 而这些额外的信息又是什么呢?

Thanks in advance! 提前致谢!

It figured out that there is a bug, when you rename composer.json this way: composer-dev.json 当您以这种方式重命名composer.json时,发现存在一个错误: composer-dev.json

Symfony Flex has a str_replace for their symfony.lock file. Symfony Flex的symfony.lock文件具有str_replace。

However renaming a custom composer.json this way: dev-composer.json works. 但是,以这种方式重命名自定义composer.json: dev-composer.json可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM