From 6aec6ecbfa0335eadf8232c609b21891f0b7e1bc Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Mon, 25 Oct 2021 13:11:35 +0200 Subject: [PATCH] Use `composer.phar` consistently in the examples --- doc/03-cli.md | 2 +- doc/05-repositories.md | 2 +- .../authentication-for-private-packages.md | 32 +++++++++---------- doc/articles/resolving-merge-conflicts.md | 4 +-- doc/articles/scripts.md | 4 +-- doc/articles/troubleshooting.md | 2 +- ...ow-to-install-untrusted-packages-safely.md | 4 +-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index d99f47e08..083b29583 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -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`. diff --git a/doc/05-repositories.md b/doc/05-repositories.md index f8a68fa30..a9002c27d 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -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) → diff --git a/doc/articles/authentication-for-private-packages.md b/doc/articles/authentication-for-private-packages.md index bbc21ee0d..af5d05ef2 100644 --- a/doc/articles/authentication-for-private-packages.md +++ b/doc/articles/authentication-for-private-packages.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 diff --git a/doc/articles/resolving-merge-conflicts.md b/doc/articles/resolving-merge-conflicts.md index 2ee30a6d1..6870cfbf3 100644 --- a/doc/articles/resolving-merge-conflicts.md +++ b/doc/articles/resolving-merge-conflicts.md @@ -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 diff --git a/doc/articles/scripts.md b/doc/articles/scripts.md index 4a29dd60e..30fa03851 100644 --- a/doc/articles/scripts.md +++ b/doc/articles/scripts.md @@ -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 diff --git a/doc/articles/troubleshooting.md b/doc/articles/troubleshooting.md index 669d4ce55..dba9023f7 100644 --- a/doc/articles/troubleshooting.md +++ b/doc/articles/troubleshooting.md @@ -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. diff --git a/doc/faqs/how-to-install-untrusted-packages-safely.md b/doc/faqs/how-to-install-untrusted-packages-safely.md index 1b3e9d383..8f19974eb 100644 --- a/doc/faqs/how-to-install-untrusted-packages-safely.md +++ b/doc/faqs/how-to-install-untrusted-packages-safely.md @@ -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`.