I'm trying to publish composer package. I saved composer.json
in my package directory:
{
"name": "vendor_name/my_bundle",
"type": "symfony-bundle",
"autoload": {
"psr-0": {
"VendorName\\MyBundle": ""
}
},
"target-dir": "VendorName/MyBundle"
}
But when I install it (composer update), with package files will added .hg directory.
Similar behaviour can be seen in this package: https://packagist.org/packages/tom32i/file-bundle (with package files will added .git directory: http://joxi.ru/uploads/prod/20130201/560/53a/136c5290b3c0f4c6f6318445f358d1d8cf30fe13.png)
Composer will look in all your repositories to find the packages your project requires. By default, only the Packagist.org repository is registered in Composer. You can add more repositories to your project by declaring them in composer. json .
To start using Composer in your project, all you need is a composer. json file. This file describes the dependencies of your project and may contain other metadata as well. It typically should go in the top-most directory of your project/VCS repository.
Quote from the documentation:
There are two ways of downloading a package: source and dist. For stable versions composer will use the dist by default. The source is a version control repository.
The package you mentioned has no stable version, so composer downloads the source from git. Use --prefer-dist
if you'd like composer to download package files (only happens if possible).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With