简体   繁体   English

作曲家中关键包装师的含义

[英]Meaning of the key packagist in composer

In the file composer.json of many projects I find:在我发现的许多项目的文件 composer.json 中:

"packagist" : false

What would interest me is what this key does and why it is used?我感兴趣的是这个密钥的作用以及为什么使用它?
In the Composer documentation, I read that it has something to do with the repository packagist.org, but I did not quite understand it (I'm new to composer).在 Composer 文档中,我读到它与存储库 packagist.org 有关,但我不太明白(我是 Composer 的新手)。
Above all, the meaning does not clear to me.最重要的是,我不清楚这个意思。 So far I thought that everything is included by default by GitHub?到目前为止,我认为 GitHub 默认包含所有内容?

By default Composer always fetches packages form packagist.org .默认情况下,Composer 总是从packagist.org获取包。 You can add your own repositories with packages, but these will be addition to packages from packagist.org .您可以使用包添加自己的存储库,但这些将添加到来自packagist.org包中。 By using "packagist" : false you can ignore packages from packagist.org and use only custom repositories - this may be useful when you want to use local source of packages to get more control what Composer is installing:通过使用"packagist" : false您可以忽略来自packagist.org包并仅使用自定义存储库 - 当您想使用本地包源来获得更多控制 Composer 正在安装的内容时,这可能很有用:

"repositories": [
    {
        "packagist.org": false
    },
    {
        "type": "composer",
        "url": "http://packages.example.org/"
    }
],

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

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