altralaser
altralaser

Reputation: 2073

Meaning of the key packagist in composer

In the file composer.json of many projects I find:

"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).
Above all, the meaning does not clear to me. So far I thought that everything is included by default by GitHub?

Upvotes: 2

Views: 383

Answers (1)

rob006
rob006

Reputation: 22174

By default Composer always fetches packages form packagist.org. You can add your own repositories with packages, but these will be addition to packages from 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:

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

Upvotes: 2

Related Questions