Fix: Keep environment variables sorted by name

main
Andreas Möller 6 years ago
parent ebde0bab7e
commit 618122f897
No known key found for this signature in database
GPG Key ID: 9FB20A0BAF60E11F

@ -796,58 +796,40 @@ COMPOSER=composer-other.json php composer.phar install
The generated lock file will use the same name: `composer-other.lock` in this example. The generated lock file will use the same name: `composer-other.lock` in this example.
### COMPOSER_ROOT_VERSION ### COMPOSER_ALLOW_SUPERUSER
By setting this var you can specify the version of the root package, if it can If set to 1, this env disables the warning about running commands as root/super user.
not be guessed from VCS info and is not present in `composer.json`. It also disables automatic clearing of sudo sessions, so you should really only set this
if you use Composer as super user at all times like in docker containers.
### COMPOSER_VENDOR_DIR ### COMPOSER_AUTH
By setting this var you can make Composer install the dependencies into a The `COMPOSER_AUTH` var allows you to set up authentication as an environment variable.
directory other than `vendor`. The contents of the variable should be a JSON formatted object containing http-basic,
github-oauth, bitbucket-oauth, ... objects as needed, and following the
[spec from the config](06-config.md#gitlab-oauth).
### COMPOSER_BIN_DIR ### COMPOSER_BIN_DIR
By setting this option you can change the `bin` ([Vendor Binaries](articles/vendor-binaries.md)) By setting this option you can change the `bin` ([Vendor Binaries](articles/vendor-binaries.md))
directory to something other than `vendor/bin`. directory to something other than `vendor/bin`.
### http_proxy or HTTP_PROXY ### COMPOSER_CACHE_DIR
If you are using Composer from behind an HTTP proxy, you can use the standard
`http_proxy` or `HTTP_PROXY` env vars. Simply set it to the URL of your proxy.
Many operating systems already set this variable for you.
Using `http_proxy` (lowercased) or even defining both might be preferable since
some tools like git or curl will only use the lower-cased `http_proxy` version.
Alternatively you can also define the git proxy using
`git config --global http.proxy <proxy url>`.
If you are using Composer in a non-CLI context (i.e. integration into a CMS or
similar use case), and need to support proxies, please provide the `CGI_HTTP_PROXY`
environment variable instead. See [httpoxy.org](https://httpoxy.org/) for further
details.
### no_proxy or NO_PROXY
If you are behind a proxy and would like to disable it for certain domains, you The `COMPOSER_CACHE_DIR` var allows you to change the Composer cache directory,
can use the `no_proxy` or `NO_PROXY` env var. Simply set it to a comma separated list of which is also configurable via the [`cache-dir`](06-config.md#cache-dir) option.
domains the proxy should *not* be used for.
The env var accepts domains, IP addresses, and IP address blocks in CIDR By default it points to `$COMPOSER_HOME/cache` on \*nix and macOS, and
notation. You can restrict the filter to a particular port (e.g. `:80`). You `C:\Users\<user>\AppData\Local\Composer` (or `%LOCALAPPDATA%/Composer`) on Windows.
can also set it to `*` to ignore the proxy for all HTTP requests.
### HTTP_PROXY_REQUEST_FULLURI ### COMPOSER_CAFILE
If you use a proxy but it does not support the request_fulluri flag, then you By setting this environmental value, you can set a path to a certificate bundle
should set this env var to `false` or `0` to prevent Composer from setting the file to be used during SSL/TLS peer verification.
request_fulluri option.
### HTTPS_PROXY_REQUEST_FULLURI ### COMPOSER_DISCARD_CHANGES
If you use a proxy but it does not support the request_fulluri flag for HTTPS This env var controls the [`discard-changes`](06-config.md#discard-changes) config option.
requests, then you should set this env var to `false` or `0` to prevent Composer
from setting the request_fulluri option.
### COMPOSER_HOME ### COMPOSER_HOME
@ -873,59 +855,77 @@ This file allows you to set [repositories](05-repositories.md) and
In case global configuration matches _local_ configuration, the _local_ In case global configuration matches _local_ configuration, the _local_
configuration in the project's `composer.json` always wins. configuration in the project's `composer.json` always wins.
### COMPOSER_CACHE_DIR ### COMPOSER_HTACCESS_PROTECT
The `COMPOSER_CACHE_DIR` var allows you to change the Composer cache directory, Defaults to `1`. If set to `0`, Composer will not create `.htaccess` files in the
which is also configurable via the [`cache-dir`](06-config.md#cache-dir) option. composer home, cache, and data directories.
By default it points to `$COMPOSER_HOME/cache` on \*nix and macOS, and ### COMPOSER_MEMORY_LIMIT
`C:\Users\<user>\AppData\Local\Composer` (or `%LOCALAPPDATA%/Composer`) on Windows.
If set, the value is used as php's memory_limit.
### COMPOSER_MIRROR_PATH_REPOS
If set to 1, this env changes the default path repository strategy to `mirror` instead
of `symlink`. As it is the default strategy being set it can still be overwritten by
repository options.
### COMPOSER_NO_INTERACTION
If set to 1, this env var will make Composer behave as if you passed the
`--no-interaction` flag to every command. This can be set on build boxes/CI.
### COMPOSER_PROCESS_TIMEOUT ### COMPOSER_PROCESS_TIMEOUT
This env var controls the time Composer waits for commands (such as git This env var controls the time Composer waits for commands (such as git
commands) to finish executing. The default value is 300 seconds (5 minutes). commands) to finish executing. The default value is 300 seconds (5 minutes).
### COMPOSER_CAFILE ### COMPOSER_ROOT_VERSION
By setting this environmental value, you can set a path to a certificate bundle
file to be used during SSL/TLS peer verification.
### COMPOSER_AUTH By setting this var you can specify the version of the root package, if it can
not be guessed from VCS info and is not present in `composer.json`.
The `COMPOSER_AUTH` var allows you to set up authentication as an environment variable. ### COMPOSER_VENDOR_DIR
The contents of the variable should be a JSON formatted object containing http-basic,
github-oauth, bitbucket-oauth, ... objects as needed, and following the
[spec from the config](06-config.md#gitlab-oauth).
### COMPOSER_DISCARD_CHANGES By setting this var you can make Composer install the dependencies into a
directory other than `vendor`.
This env var controls the [`discard-changes`](06-config.md#discard-changes) config option. ### http_proxy or HTTP_PROXY
### COMPOSER_NO_INTERACTION If you are using Composer from behind an HTTP proxy, you can use the standard
`http_proxy` or `HTTP_PROXY` env vars. Simply set it to the URL of your proxy.
Many operating systems already set this variable for you.
If set to 1, this env var will make Composer behave as if you passed the Using `http_proxy` (lowercased) or even defining both might be preferable since
`--no-interaction` flag to every command. This can be set on build boxes/CI. some tools like git or curl will only use the lower-cased `http_proxy` version.
Alternatively you can also define the git proxy using
`git config --global http.proxy <proxy url>`.
### COMPOSER_ALLOW_SUPERUSER If you are using Composer in a non-CLI context (i.e. integration into a CMS or
similar use case), and need to support proxies, please provide the `CGI_HTTP_PROXY`
environment variable instead. See [httpoxy.org](https://httpoxy.org/) for further
details.
If set to 1, this env disables the warning about running commands as root/super user. ### HTTP_PROXY_REQUEST_FULLURI
It also disables automatic clearing of sudo sessions, so you should really only set this
if you use Composer as super user at all times like in docker containers.
### COMPOSER_MEMORY_LIMIT If you use a proxy but it does not support the request_fulluri flag, then you
should set this env var to `false` or `0` to prevent Composer from setting the
request_fulluri option.
If set, the value is used as php's memory_limit. ### HTTPS_PROXY_REQUEST_FULLURI
### COMPOSER_MIRROR_PATH_REPOS If you use a proxy but it does not support the request_fulluri flag for HTTPS
requests, then you should set this env var to `false` or `0` to prevent Composer
from setting the request_fulluri option.
If set to 1, this env changes the default path repository strategy to `mirror` instead ### no_proxy or NO_PROXY
of `symlink`. As it is the default strategy being set it can still be overwritten by
repository options.
### COMPOSER_HTACCESS_PROTECT If you are behind a proxy and would like to disable it for certain domains, you
can use the `no_proxy` or `NO_PROXY` env var. Simply set it to a comma separated list of
domains the proxy should *not* be used for.
Defaults to `1`. If set to `0`, Composer will not create `.htaccess` files in the The env var accepts domains, IP addresses, and IP address blocks in CIDR
composer home, cache, and data directories. notation. You can restrict the filter to a particular port (e.g. `:80`). You
can also set it to `*` to ignore the proxy for all HTTP requests.
&larr; [Libraries](02-libraries.md) | [Schema](04-schema.md) &rarr; &larr; [Libraries](02-libraries.md) | [Schema](04-schema.md) &rarr;

Loading…
Cancel
Save