Custom Composer Repositories
Define a composer repository
composer.json
:
1 2 3 4 |
{ "name": "package/name", "description": "some introduction..." } |
Require a custom repository
composer.json
:
1 2 3 4 5 6 7 8 9 10 11 |
{ "require": { "package/name": "1.0.0" }, "repositories": [ { "type": "vcs", } ] } |
p.s. Composer 讀取版本的依據是 Repository 上的 Tag
Disable Packagist repository source
You can disable the default Packagist repository by adding this to your composer.json
:
1 2 3 4 5 6 7 |
{ "repositories": [ { "packagist": false } ] } |