1
0
Fork 0

Docs: add transport options example and differentiate between cURL and stream options (#10289)

+ remove Bitbucket mercurial reference
pull/10290/head
Stephan 2021-11-17 18:54:30 +00:00 committed by GitHub
parent 63b5cbe000
commit 5297f72e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 6 deletions

View File

@ -299,12 +299,33 @@ described [above](#packages).
These fields are optional. You probably don't need them for your own custom These fields are optional. You probably don't need them for your own custom
repository. repository.
#### stream options #### cURL or stream options
The `packages.json` file is loaded using a PHP stream. You can set extra The repository is accessed either using cURL (Composer 2 with ext-curl enabled)
options on that stream using the `options` parameter. You can set any valid or PHP streams. You can set extra options using the `options` parameter. For
PHP stream context option. See [Context options and PHP streams, you can set any valid PHP stream context option. See [Context
parameters](https://php.net/manual/en/context.php) for more information. options and parameters](https://php.net/manual/en/context.php) for more
information. When cURL is used, only a limited set of `http` and `ssl` options
can be configured.
```json
{
"repositories": [
{
"type": "composer",
"url": "https://example.org",
"options": {
"http": {
"timeout": 60
}
}
}
],
"require": {
"acme/package": "^1.0"
}
}
```
### VCS ### VCS
@ -397,7 +418,7 @@ fetch the packages without having to install the version control system. The
VCS repository provides `dist`s for them that fetch the packages as zips. VCS repository provides `dist`s for them that fetch the packages as zips.
* **GitHub:** [github.com](https://github.com) (Git) * **GitHub:** [github.com](https://github.com) (Git)
* **BitBucket:** [bitbucket.org](https://bitbucket.org) (Git and Mercurial) * **BitBucket:** [bitbucket.org](https://bitbucket.org) (Git)
The VCS driver to be used is detected automatically based on the URL. However, The VCS driver to be used is detected automatically based on the URL. However,
should you need to specify one for whatever reason, you can use `bitbucket`, should you need to specify one for whatever reason, you can use `bitbucket`,