2015-06-22 08:00:04 +00:00
|
|
|
# Config
|
|
|
|
|
2015-10-27 15:36:12 +00:00
|
|
|
This chapter will describe the `config` section of the `composer.json`
|
2015-06-22 09:13:12 +00:00
|
|
|
[schema](04-schema.md).
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## process-timeout
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2020-10-22 12:43:26 +00:00
|
|
|
The timeout in seconds for process executions, defaults to 300 (5mins).
|
|
|
|
The duration processes like git clones can run before
|
2015-06-22 08:54:55 +00:00
|
|
|
Composer assumes they died out. You may need to make this higher if you have a
|
|
|
|
slow connection or huge vendors.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2019-04-10 17:44:35 +00:00
|
|
|
To disable the process timeout on a custom command under `scripts`, a static
|
|
|
|
helper is available:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"scripts": {
|
|
|
|
"test": [
|
|
|
|
"Composer\\Config::disableProcessTimeout",
|
|
|
|
"phpunit"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2021-12-07 22:00:48 +00:00
|
|
|
## allow-plugins
|
|
|
|
|
|
|
|
Defaults to `null` (allow all plugins implicitly) for backwards compatibility until July 2022.
|
|
|
|
At that point the default will become `{}` and plugins will not load anymore unless allowed.
|
|
|
|
|
|
|
|
As of Composer 2.2.0, the `allow-plugins` option adds a layer of security
|
|
|
|
allowing you to restrict which Composer plugins are able to execute code during
|
|
|
|
a Composer run.
|
|
|
|
|
|
|
|
When a new plugin is first activated, which is not yet listed in the config option,
|
|
|
|
Composer will print a warning. If you run Composer interactively it will
|
|
|
|
prompt you to decide if you want to execute the plugin or not.
|
|
|
|
|
|
|
|
Use this setting to allow only packages you trust to execute code. Set it to
|
|
|
|
an object with package name patterns as keys. The values are **true** to allow
|
|
|
|
and **false** to disallow while suppressing further warnings and prompts.
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"config": {
|
|
|
|
"allow-plugins": {
|
|
|
|
"third-party/required-plugin": true,
|
|
|
|
"my-organization/*": true,
|
|
|
|
"unnecessary/plugin": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also set the config option itself to `false` to disallow all plugins, or `true` to allow all plugins to run (NOT recommended).
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## use-include-path
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 09:08:23 +00:00
|
|
|
Defaults to `false`. If `true`, the Composer autoloader will also look for classes
|
2015-06-22 08:54:55 +00:00
|
|
|
in the PHP include path.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## preferred-install
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2021-04-07 14:04:42 +00:00
|
|
|
Defaults to `dist` and can be any of `source`, `dist` or `auto`. This option
|
2016-02-25 19:03:36 +00:00
|
|
|
allows you to set the install method Composer will prefer to use. Can
|
2021-12-07 22:00:48 +00:00
|
|
|
optionally be an object with package name patterns for keys for more granular install preferences.
|
2016-02-25 19:03:36 +00:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"config": {
|
|
|
|
"preferred-install": {
|
|
|
|
"my-organization/stable-package": "dist",
|
|
|
|
"my-organization/*": "source",
|
|
|
|
"partner-organization/*": "auto",
|
|
|
|
"*": "dist"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2021-04-07 14:04:42 +00:00
|
|
|
- `source` means Composer will install packages from their `source` if there
|
|
|
|
is one. This is typically a git clone or equivalent checkout of the version
|
|
|
|
control system the package uses. This is useful if you want to make a bugfix
|
|
|
|
to a project and get a local git clone of the dependency directly.
|
|
|
|
- `auto` is the legacy behavior where Composer uses `source` automatically
|
|
|
|
for dev versions, and `dist` otherwise.
|
|
|
|
- `dist` (the default as of Composer 2.1) means Composer installs from `dist`,
|
|
|
|
where possible. This is typically a zip file download, which is faster than
|
|
|
|
cloning the entire repository.
|
|
|
|
|
2016-02-25 19:03:36 +00:00
|
|
|
> **Note:** Order matters. More specific patterns should be earlier than
|
|
|
|
> more relaxed patterns. When mixing the string notation with the hash
|
|
|
|
> configuration in global and package configurations the string notation
|
|
|
|
> is translated to a `*` package pattern.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2021-12-04 14:00:28 +00:00
|
|
|
## use-parent-dir
|
|
|
|
|
|
|
|
When running Composer in a directory where there is no composer.json, if there
|
|
|
|
is one present in a directory above Composer will by default ask you whether
|
|
|
|
you want to use that directory's composer.json instead.
|
|
|
|
|
|
|
|
If you always want to answer yes to this prompt, you can set this config value
|
2021-12-19 14:15:21 +00:00
|
|
|
to `true`. To never be prompted, set it to `false`. The default is `"prompt"`.
|
2021-12-04 14:00:28 +00:00
|
|
|
|
|
|
|
> **Note:** This config must be set in your global user-wide config for it
|
|
|
|
> to work. Use for example `php composer.phar config --global use-parent-dir true`
|
|
|
|
> to set it.
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## store-auths
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
What to do after prompting for authentication, one of: `true` (always store),
|
|
|
|
`false` (do not store) and `"prompt"` (ask every time), defaults to `"prompt"`.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## github-protocols
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2016-03-01 13:46:54 +00:00
|
|
|
Defaults to `["https", "ssh", "git"]`. A list of protocols to use when cloning
|
|
|
|
from github.com, in priority order. By default `git` is present but only if [secure-http](#secure-http)
|
|
|
|
is disabled, as the git protocol is not encrypted. If you want your origin remote
|
|
|
|
push URLs to be using https and not ssh (`git@github.com:...`), then set the protocol
|
|
|
|
list to be only `["https"]` and Composer will stop overwriting the push URL to an ssh
|
|
|
|
URL.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## github-oauth
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
A list of domain names and oauth keys. For example using `{"github.com":
|
|
|
|
"oauthtoken"}` as the value of this option will use `oauthtoken` to access
|
|
|
|
private repositories on github and to circumvent the low IP-based rate limiting
|
2020-10-13 21:30:47 +00:00
|
|
|
of their API. Composer may prompt for credentials when needed, but these can also be
|
|
|
|
manually set. Read more on how to get an OAuth token for GitHub and cli syntax
|
|
|
|
[here](articles/authentication-for-private-packages.md#github-oauth).
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2021-05-27 21:05:53 +00:00
|
|
|
## gitlab-domains
|
|
|
|
|
|
|
|
Defaults to `["gitlab.com"]`. A list of domains of GitLab servers.
|
|
|
|
This is used if you use the `gitlab` repository type.
|
|
|
|
|
2016-01-10 16:35:29 +00:00
|
|
|
## gitlab-oauth
|
|
|
|
|
|
|
|
A list of domain names and oauth keys. For example using `{"gitlab.com":
|
|
|
|
"oauthtoken"}` as the value of this option will use `oauthtoken` to access
|
2020-03-10 12:39:22 +00:00
|
|
|
private repositories on gitlab. Please note: If the package is not hosted at
|
|
|
|
gitlab.com the domain names must be also specified with the
|
2018-05-03 13:43:36 +00:00
|
|
|
[`gitlab-domains`](06-config.md#gitlab-domains) option.
|
2020-10-13 21:55:17 +00:00
|
|
|
Further info can also be found [here](articles/authentication-for-private-packages.md#gitlab-oauth)
|
2016-01-10 16:35:29 +00:00
|
|
|
|
2016-07-06 08:25:18 +00:00
|
|
|
## gitlab-token
|
|
|
|
|
2020-08-25 11:55:32 +00:00
|
|
|
A list of domain names and private tokens. Private token can be either simple
|
|
|
|
string, or array with username and token. For example using `{"gitlab.com":
|
2016-07-06 08:25:18 +00:00
|
|
|
"privatetoken"}` as the value of this option will use `privatetoken` to access
|
2020-05-08 15:43:07 +00:00
|
|
|
private repositories on gitlab. Using `{"gitlab.com": {"username": "gitlabuser",
|
2020-08-25 11:55:32 +00:00
|
|
|
"token": "privatetoken"}}` will use both username and token for gitlab deploy
|
2020-05-08 15:43:07 +00:00
|
|
|
token functionality (https://docs.gitlab.com/ee/user/project/deploy_tokens/)
|
|
|
|
Please note: If the package is not hosted at
|
2020-03-10 12:39:22 +00:00
|
|
|
gitlab.com the domain names must be also specified with the
|
2020-08-28 06:05:04 +00:00
|
|
|
[`gitlab-domains`](06-config.md#gitlab-domains) option. The token must have
|
|
|
|
`api` or `read_api` scope.
|
2020-10-13 21:55:17 +00:00
|
|
|
Further info can also be found [here](articles/authentication-for-private-packages.md#gitlab-token)
|
2016-07-06 08:25:18 +00:00
|
|
|
|
2021-05-27 21:05:53 +00:00
|
|
|
## gitlab-protocol
|
|
|
|
|
|
|
|
A protocol to force use of when creating a repository URL for the `source`
|
|
|
|
value of the package metadata. One of `git` or `http`. (`https` is treated
|
|
|
|
as a synonym for `http`.) Helpful when working with projects referencing
|
|
|
|
private repositories which will later be cloned in GitLab CI jobs with a
|
2021-06-03 07:19:05 +00:00
|
|
|
[GitLab CI_JOB_TOKEN](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#predefined-variables-reference)
|
2021-05-27 21:05:53 +00:00
|
|
|
using HTTP basic auth. By default, Composer will generate a git-over-SSH
|
|
|
|
URL for private repositories and HTTP(S) only for public.
|
|
|
|
|
2016-01-10 16:35:29 +00:00
|
|
|
## disable-tls
|
|
|
|
|
|
|
|
Defaults to `false`. If set to true all HTTPS URLs will be tried with HTTP
|
|
|
|
instead and no network level encryption is performed. Enabling this is a
|
|
|
|
security risk and is NOT recommended. The better way is to enable the
|
2020-10-12 05:57:14 +00:00
|
|
|
php_openssl extension in php.ini. Enabling this will implicitly disable the
|
|
|
|
`secure-http` option.
|
2016-01-10 16:35:29 +00:00
|
|
|
|
2016-02-25 12:36:09 +00:00
|
|
|
## secure-http
|
|
|
|
|
|
|
|
Defaults to `true`. If set to true only HTTPS URLs are allowed to be
|
|
|
|
downloaded via Composer. If you really absolutely need HTTP access to something
|
|
|
|
then you can disable it, but using [Let's Encrypt](https://letsencrypt.org/) to
|
|
|
|
get a free SSL certificate is generally a better alternative.
|
|
|
|
|
2016-03-07 03:20:22 +00:00
|
|
|
## bitbucket-oauth
|
|
|
|
|
|
|
|
A list of domain names and consumers. For example using `{"bitbucket.org":
|
2020-10-13 21:55:17 +00:00
|
|
|
{"consumer-key": "myKey", "consumer-secret": "mySecret"}}`.
|
|
|
|
Read more [here](articles/authentication-for-private-packages.md#bitbucket-oauth).
|
2016-03-07 03:20:22 +00:00
|
|
|
|
2016-01-10 16:35:29 +00:00
|
|
|
## cafile
|
|
|
|
|
2016-01-20 20:20:18 +00:00
|
|
|
Location of Certificate Authority file on local filesystem. In PHP 5.6+ you
|
|
|
|
should rather set this via openssl.cafile in php.ini, although PHP 5.6+ should
|
|
|
|
be able to detect your system CA file automatically.
|
|
|
|
|
|
|
|
## capath
|
|
|
|
|
|
|
|
If cafile is not specified or if the certificate is not found there, the
|
|
|
|
directory pointed to by capath is searched for a suitable certificate.
|
|
|
|
capath must be a correctly hashed certificate directory.
|
2016-01-10 16:35:29 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## http-basic
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
A list of domain names and username/passwords to authenticate against them. For
|
2016-05-11 21:04:51 +00:00
|
|
|
example using `{"example.org": {"username": "alice", "password": "foo"}}` as the
|
2015-06-22 09:08:23 +00:00
|
|
|
value of this option will let Composer authenticate against example.org.
|
2020-10-13 21:55:17 +00:00
|
|
|
More info can be found [here](articles/authentication-for-private-packages.md#http-basic).
|
2015-06-22 12:31:33 +00:00
|
|
|
|
2020-03-10 12:39:22 +00:00
|
|
|
## bearer
|
|
|
|
|
|
|
|
A list of domain names and tokens to authenticate against them. For example using
|
|
|
|
`{"example.org": "foo"}` as the value of this option will let Composer authenticate
|
|
|
|
against example.org using an `Authorization: Bearer foo` header.
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## platform
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Lets you fake platform packages (PHP and extensions) so that you can emulate a
|
2015-06-22 09:08:23 +00:00
|
|
|
production env or define your target platform in the config. Example: `{"php":
|
2018-02-01 10:03:56 +00:00
|
|
|
"7.0.3", "ext-something": "4.0.3"}`.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2020-11-13 14:51:24 +00:00
|
|
|
This will make sure that no package requiring more than PHP 7.0.3 can be installed
|
|
|
|
regardless of the actual PHP version you run locally. However it also means
|
|
|
|
the dependencies are not checked correctly anymore, if you run PHP 5.6 it will
|
|
|
|
install fine as it assumes 7.0.3, but then it will fail at runtime.
|
|
|
|
|
|
|
|
Therefore if you use this it is recommended, and safer, to also run the
|
|
|
|
[`check-platform-reqs`](03-cli.md#check-platform-reqs) command as part of your
|
|
|
|
deployment strategy.
|
|
|
|
|
|
|
|
If a dependency requires some extension that you do not have installed locally
|
|
|
|
you may ignore it instead by passing `--ignore-platform-req=ext-foo` to `update`,
|
|
|
|
`install` or `require`. In the long run though you should install required
|
|
|
|
extensions as if you ignore one now and a new package you add a month later also
|
|
|
|
requires it, you may introduce issues in production unknowingly.
|
|
|
|
|
2021-11-25 13:46:25 +00:00
|
|
|
If you have an extension installed locally but *not* on production, you may want
|
|
|
|
to artificially hide it from Composer using `{"ext-foo": false}`.
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## vendor-dir
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `vendor`. You can install dependencies into a different directory if
|
|
|
|
you want to. `$HOME` and `~` will be replaced by your home directory's path in
|
|
|
|
vendor-dir and all `*-dir` options below.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## bin-dir
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `vendor/bin`. If a project includes binaries, they will be symlinked
|
|
|
|
into this directory.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2016-01-18 18:26:05 +00:00
|
|
|
## data-dir
|
|
|
|
|
|
|
|
Defaults to `C:\Users\<user>\AppData\Roaming\Composer` on Windows,
|
|
|
|
`$XDG_DATA_HOME/composer` on unix systems that follow the XDG Base Directory
|
2021-12-19 13:05:57 +00:00
|
|
|
Specifications, and `$COMPOSER_HOME` on other unix systems. Right now it is only
|
|
|
|
used for storing past composer.phar files to be able to roll back to older
|
2016-01-18 18:26:05 +00:00
|
|
|
versions. See also [COMPOSER_HOME](03-cli.md#composer-home).
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-dir
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2016-01-18 18:26:05 +00:00
|
|
|
Defaults to `C:\Users\<user>\AppData\Local\Composer` on Windows,
|
2021-05-27 21:07:23 +00:00
|
|
|
`/Users/<user>/Library/Caches/composer` on macOS, `$XDG_CACHE_HOME/composer`
|
|
|
|
on unix systems that follow the XDG Base Directory Specifications, and
|
2021-12-19 13:05:57 +00:00
|
|
|
`$COMPOSER_HOME/cache` on other unix systems. Stores all the caches used by
|
|
|
|
Composer. See also [COMPOSER_HOME](03-cli.md#composer-home).
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-files-dir
|
2015-06-22 08:53:17 +00:00
|
|
|
|
|
|
|
Defaults to `$cache-dir/files`. Stores the zip archives of packages.
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-repo-dir
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `$cache-dir/repo`. Stores repository metadata for the `composer`
|
2016-06-22 05:19:29 +00:00
|
|
|
type and the VCS repos of type `svn`, `fossil`, `github` and `bitbucket`.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-vcs-dir
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `$cache-dir/vcs`. Stores VCS clones for loading VCS repository
|
|
|
|
metadata for the `git`/`hg` types and to speed up installs.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-files-ttl
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2020-06-30 15:39:56 +00:00
|
|
|
Defaults to `15552000` (6 months). Composer caches all dist (zip, tar, ...)
|
2015-06-22 08:54:55 +00:00
|
|
|
packages that it downloads. Those are purged after six months of being unused by
|
|
|
|
default. This option allows you to tweak this duration (in seconds) or disable
|
|
|
|
it completely by setting it to 0.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## cache-files-maxsize
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2020-06-30 15:39:56 +00:00
|
|
|
Defaults to `300MiB`. Composer caches all dist (zip, tar, ...) packages that it
|
2015-06-22 08:54:55 +00:00
|
|
|
downloads. When the garbage collection is periodically ran, this is the maximum
|
|
|
|
size the cache will be able to use. Older (less used) files will be removed
|
|
|
|
first until the cache fits.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2020-08-25 11:55:32 +00:00
|
|
|
## cache-read-only
|
|
|
|
|
|
|
|
Defaults to `false`. Whether to use the Composer cache in read-only mode.
|
|
|
|
|
2015-07-22 13:54:20 +00:00
|
|
|
## bin-compat
|
|
|
|
|
|
|
|
Defaults to `auto`. Determines the compatibility of the binaries to be installed.
|
2021-06-09 09:33:44 +00:00
|
|
|
If it is `auto` then Composer only installs .bat proxy files when on Windows or WSL. If
|
2015-10-27 15:36:12 +00:00
|
|
|
set to `full` then both .bat files for Windows and scripts for Unix-based
|
|
|
|
operating systems will be installed for each binary. This is mainly useful if you
|
2021-06-09 09:33:44 +00:00
|
|
|
run Composer inside a linux VM but still want the `.bat` proxies available for use
|
2021-11-25 08:53:03 +00:00
|
|
|
in the Windows host OS. If set to `proxy` Composer will only create bash/Unix-style
|
|
|
|
proxy files and no .bat files even on Windows/WSL.
|
2015-07-22 13:54:20 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## prepend-autoloader
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:31:33 +00:00
|
|
|
Defaults to `true`. If `false`, the Composer autoloader will not be prepended to
|
2015-06-22 08:54:55 +00:00
|
|
|
existing autoloaders. This is sometimes required to fix interoperability issues
|
|
|
|
with other autoloaders.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## autoloader-suffix
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `null`. String to be used as a suffix for the generated Composer
|
|
|
|
autoloader. When null a random one will be generated.
|
2015-06-22 08:00:04 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## optimize-autoloader
|
2015-06-22 08:54:55 +00:00
|
|
|
|
2015-06-22 12:31:33 +00:00
|
|
|
Defaults to `false`. If `true`, always optimize when dumping the autoloader.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-12-21 18:59:40 +00:00
|
|
|
## sort-packages
|
|
|
|
|
2015-12-22 20:44:41 +00:00
|
|
|
Defaults to `false`. If `true`, the `require` command keeps packages sorted
|
|
|
|
by name in `composer.json` when adding a new package.
|
2015-12-21 18:59:40 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## classmap-authoritative
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-08-16 19:56:52 +00:00
|
|
|
Defaults to `false`. If `true`, the Composer autoloader will only load classes
|
|
|
|
from the classmap. Implies `optimize-autoloader`.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2016-07-28 08:23:39 +00:00
|
|
|
## apcu-autoloader
|
|
|
|
|
|
|
|
Defaults to `false`. If `true`, the Composer autoloader will check for APCu and
|
|
|
|
use it to cache found/not-found classes when the extension is enabled.
|
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## github-domains
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `["github.com"]`. A list of domains to use in github mode. This is
|
|
|
|
used for GitHub Enterprise setups.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## github-expose-hostname
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:31:33 +00:00
|
|
|
Defaults to `true`. If `false`, the OAuth tokens created to access the
|
2015-06-22 08:54:55 +00:00
|
|
|
github API will have a date instead of the machine hostname.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2019-01-28 20:53:24 +00:00
|
|
|
## use-github-api
|
|
|
|
|
2019-01-29 09:55:05 +00:00
|
|
|
Defaults to `true`. Similar to the `no-api` key on a specific repository,
|
|
|
|
setting `use-github-api` to `false` will define the global behavior for all
|
|
|
|
GitHub repositories to clone the repository as it would with any other git
|
|
|
|
repository instead of using the GitHub API. But unlike using the `git`
|
|
|
|
driver directly, Composer will still attempt to use GitHub's zip files.
|
2019-01-28 20:53:24 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## notify-on-install
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `true`. Composer allows repositories to define a notification URL,
|
|
|
|
so that they get notified whenever a package from that repository is installed.
|
2019-11-21 22:00:29 +00:00
|
|
|
This option allows you to disable that behavior.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## discard-changes
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 08:54:55 +00:00
|
|
|
Defaults to `false` and can be any of `true`, `false` or `"stash"`. This option
|
|
|
|
allows you to set the default style of handling dirty updates when in
|
|
|
|
non-interactive mode. `true` will always discard changes in vendors, while
|
|
|
|
`"stash"` will try to stash and reapply. Use this for CI servers or deploy
|
|
|
|
scripts if you tend to have modified vendors.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## archive-format
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2020-10-23 19:52:05 +00:00
|
|
|
Defaults to `tar`. Overrides the default format used by the archive command.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2015-06-22 12:05:50 +00:00
|
|
|
## archive-dir
|
2015-06-22 08:53:17 +00:00
|
|
|
|
2020-10-23 19:52:05 +00:00
|
|
|
Defaults to `.`. Default destination for archives created by the archive
|
|
|
|
command.
|
2015-06-22 08:53:17 +00:00
|
|
|
|
|
|
|
Example:
|
2015-06-22 08:00:04 +00:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2015-06-22 08:53:17 +00:00
|
|
|
"config": {
|
2015-09-28 11:23:24 +00:00
|
|
|
"archive-dir": "/home/user/.composer/repo"
|
2015-06-22 08:53:17 +00:00
|
|
|
}
|
2015-06-22 08:00:04 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-06-15 15:06:13 +00:00
|
|
|
## htaccess-protect
|
|
|
|
|
2017-06-16 12:26:43 +00:00
|
|
|
Defaults to `true`. If set to `false`, Composer will not create `.htaccess` files
|
2021-10-25 11:11:56 +00:00
|
|
|
in the Composer home, cache, and data directories.
|
2017-06-15 15:06:13 +00:00
|
|
|
|
2019-10-19 19:46:29 +00:00
|
|
|
## lock
|
|
|
|
|
2020-03-10 12:39:22 +00:00
|
|
|
Defaults to `true`. If set to `false`, Composer will not create a `composer.lock`
|
2019-10-19 19:46:29 +00:00
|
|
|
file.
|
|
|
|
|
2020-04-21 13:25:35 +00:00
|
|
|
## platform-check
|
|
|
|
|
2020-11-04 21:15:49 +00:00
|
|
|
Defaults to `php-only` which only checks the PHP version. Set to `true` to also
|
|
|
|
check the presence of extension. If set to `false`, Composer will not create and
|
|
|
|
require a `platform_check.php` file as part of the autoloader bootstrap.
|
2020-04-21 13:25:35 +00:00
|
|
|
|
2021-05-20 14:27:54 +00:00
|
|
|
## secure-svn-domains
|
|
|
|
|
|
|
|
Defaults to `[]`. Lists domains which should be trusted/marked as using a secure
|
|
|
|
Subversion/SVN transport. By default svn:// protocol is seen as insecure and will
|
|
|
|
throw, but you can set this config option to `["example.org"]` to allow using svn
|
|
|
|
URLs on that hostname. This is a better/safer alternative to disabling `secure-http`
|
|
|
|
altogether.
|
|
|
|
|
2020-05-01 08:18:54 +00:00
|
|
|
← [Repositories](05-repositories.md) | [Runtime](07-runtime.md) →
|