Skip to content

update php/docs/intallation.md #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,31 @@ Install [Composer](https://getcomposer.org) following your devices OS [installat

## Install PHPUnit

### Via Composer
### Via PHP Archive (PHAR)

The easiest way to use PHPUnit for Exercism exercises is downloading a distribution that is packaged as a PHP Archive (PHAR), which is also the recommended way to use PHPUnit.

### Manual installation

PHPUnit version 10 can be installed globally via [Composer](https://getcomposer.org), using the following command:
You can download a release of PHPUnit packages as a PHP archive:

```shell
composer global require phpunit/phpunit ^10.5
wget -O phpunit.phar https://phar.phpunit.de/phpunit-10.phar
```
Then make the PHAR executable (it is a common practice)

```shell
chmod +x phpunit.phar
```
Now you can run the PHAR.

Please make sure you install version 10.5 or later.
You can also follow the official [Installing PHPUnit instructions](https://docs.phpunit.de/en/10.5/installation.html#installing-phpunit) to Install PHPUnit via a PHP Archive (PHAR)

### Manual installation
### Via Composer

PHPUnit version 10 can also be installed globally via [Composer](https://getcomposer.org), using the following command:

If you are not using Composer package manager, follow the official [Installing PHPUnit instructions](https://docs.phpunit.de/en/10.5/installation.html#installing-phpunit).
```shell
composer global require phpunit/phpunit ^10.5
```
Please make sure you install version 10.5 or later.