Use `composer.phar` consistently in the examples
parent
13d433fad0
commit
6aec6ecbfa
|
@ -9,7 +9,7 @@ can give you more information.
|
|||
|
||||
As Composer uses [symfony/console](https://github.com/symfony/console) you can call commands by short name if it's not ambiguous.
|
||||
```sh
|
||||
composer dump
|
||||
php composer.phar dump
|
||||
```
|
||||
calls `composer dump-autoload`.
|
||||
|
||||
|
|
|
@ -750,7 +750,7 @@ You can disable the default Packagist.org repository by adding this to your
|
|||
You can disable Packagist.org globally by using the global config flag:
|
||||
|
||||
```bash
|
||||
composer config -g repo.packagist false
|
||||
php composer.phar config -g repo.packagist false
|
||||
```
|
||||
|
||||
← [Schema](04-schema.md) | [Config](06-config.md) →
|
||||
|
|
|
@ -63,7 +63,7 @@ For all authentication methods it is possible to edit them using the command lin
|
|||
To manually edit it, run:
|
||||
|
||||
```sh
|
||||
composer config --global --editor [--auth]
|
||||
php composer.phar config --global --editor [--auth]
|
||||
```
|
||||
|
||||
For specific authentication implementations, see their sections;
|
||||
|
@ -80,7 +80,7 @@ To fix this you need to open the file in an editor and fix the error. To find th
|
|||
your global `auth.json`, execute:
|
||||
|
||||
```sh
|
||||
composer config --global home
|
||||
php composer.phar config --global home
|
||||
```
|
||||
|
||||
The folder will contain your global `auth.json` if it exists.
|
||||
|
@ -115,13 +115,13 @@ Read more about the usage of this environment variable [here](../03-cli.md#compo
|
|||
### Command line http-basic
|
||||
|
||||
```sh
|
||||
composer config [--global] http-basic.example.org username password
|
||||
php composer.phar config [--global] http-basic.example.org username password
|
||||
```
|
||||
|
||||
### Manual http-basic
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor --auth
|
||||
php composer.phar config [--global] --editor --auth
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -147,13 +147,13 @@ If the username e.g. is an email address it needs to be passed as `name%40exampl
|
|||
### Command line inline http-basic
|
||||
|
||||
```sh
|
||||
composer config [--global] repositories composer.unique-name https://username:password@repo.example.org
|
||||
php composer.phar config [--global] repositories composer.unique-name https://username:password@repo.example.org
|
||||
```
|
||||
|
||||
### Manual inline http-basic
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor
|
||||
php composer.phar config [--global] --editor
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -172,7 +172,7 @@ composer config [--global] --editor
|
|||
### Manual custom token authentication
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor
|
||||
php composer.phar config [--global] --editor
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -201,13 +201,13 @@ composer config [--global] --editor
|
|||
### Command line gitlab-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] gitlab-oauth.example.org token
|
||||
php composer.phar config [--global] gitlab-oauth.example.org token
|
||||
```
|
||||
|
||||
### Manual gitlab-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor --auth
|
||||
php composer.phar config [--global] --editor --auth
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -226,18 +226,18 @@ composer config [--global] --editor --auth
|
|||
To create a new access token, go to your [access tokens section on GitLab](https://gitlab.com/-/profile/personal_access_tokens)
|
||||
(or the equivalent URL on your private instance) and create a new token. See also [the GitLab access token documentation](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token) for more informations.
|
||||
|
||||
When creating a gitlab token manually, make sure it has either the `read_api` or `api` scope.
|
||||
When creating a gitlab token manually, make sure it has either the `read_api` or `api` scope.
|
||||
|
||||
### Command line gitlab-token
|
||||
|
||||
```sh
|
||||
composer config [--global] gitlab-token.example.org token
|
||||
php composer.phar config [--global] gitlab-token.example.org token
|
||||
```
|
||||
|
||||
### Manual gitlab-token
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor --auth
|
||||
php composer.phar config [--global] --editor --auth
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -256,13 +256,13 @@ Read more about it [here](https://github.com/blog/1509-personal-api-tokens).
|
|||
### Command line github-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] github-oauth.github.com token
|
||||
php composer.phar config [--global] github-oauth.github.com token
|
||||
```
|
||||
|
||||
### Manual github-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor --auth
|
||||
php composer.phar config [--global] --editor --auth
|
||||
```
|
||||
|
||||
```json
|
||||
|
@ -280,13 +280,13 @@ The BitBucket driver uses OAuth to access your private repositories via the BitB
|
|||
### Command line bitbucket-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] bitbucket-oauth.bitbucket.org consumer-key consumer-secret
|
||||
php composer.phar config [--global] bitbucket-oauth.bitbucket.org consumer-key consumer-secret
|
||||
```
|
||||
|
||||
### Manual bitbucket-oauth
|
||||
|
||||
```sh
|
||||
composer config [--global] --editor --auth
|
||||
php composer.phar config [--global] --editor --auth
|
||||
```
|
||||
|
||||
```json
|
||||
|
|
|
@ -43,8 +43,8 @@ Before committing, make sure the resulting `composer.json` and `composer.lock` f
|
|||
To do this, run the following commands:
|
||||
|
||||
```sh
|
||||
composer validate
|
||||
composer install [--dry-run]
|
||||
php composer.phar validate
|
||||
php composer.phar install [--dry-run]
|
||||
```
|
||||
|
||||
## Important considerations
|
||||
|
|
|
@ -193,7 +193,7 @@ objects:
|
|||
If you would like to run the scripts for an event manually, the syntax is:
|
||||
|
||||
```sh
|
||||
composer run-script [--dev] [--no-dev] script
|
||||
php composer.phar run-script [--dev] [--no-dev] script
|
||||
```
|
||||
|
||||
For example `composer run-script post-install-cmd` will run any
|
||||
|
@ -276,7 +276,7 @@ To disable the timeout of a single script call, you must use the `run-script` co
|
|||
command and specify the `--timeout` parameter:
|
||||
|
||||
```
|
||||
composer run-script --timeout=0 test
|
||||
php composer.phar run-script --timeout=0 test
|
||||
```
|
||||
|
||||
## Referencing scripts
|
||||
|
|
|
@ -312,7 +312,7 @@ As a workaround, open a SSH connection to your Git host before running Composer:
|
|||
|
||||
```bash
|
||||
ssh -t git@mygitserver.tld
|
||||
composer update
|
||||
php composer.phar update
|
||||
```
|
||||
|
||||
See also https://github.com/composer/composer/issues/4180 for more information.
|
||||
|
|
|
@ -9,8 +9,8 @@ You can disable plugins and scripts during package installation or updates with
|
|||
syntax so only Composer's code, and no third party code, will execute:
|
||||
|
||||
```sh
|
||||
composer install --no-plugins --no-scripts ...
|
||||
composer update --no-plugins --no-scripts ...
|
||||
php composer.phar install --no-plugins --no-scripts ...
|
||||
php composer.phar update --no-plugins --no-scripts ...
|
||||
```
|
||||
|
||||
The `exec` command will always run third party code as the user which runs `composer`.
|
||||
|
|
Loading…
Reference in New Issue