From b3c1b94b7aa7e026beafa4870db21c18204a8757 Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 18 Feb 2024 19:23:07 +0100 Subject: [PATCH] Apply suggestion from review and improve markdown --- README.md | 53 +++++++++++++++++++++++++++-------------------------- phpcs.xml | 6 ++---- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 7087b16a..906b6caa 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,33 @@ Exercism exercises in PHP -Follow these instructions, if you want to contribute to the track. -You must have a BASH shell to run the tooling locally. - -If you only want to solve the exercises, go to the [track docs][track-docs] and choose your installation option there. +Follow these instructions to contribute to the PHP track. +To solve the exercises, head to the [PHP track][exercism-track-home] and check the [documentation][exercism-track-installation]. ## Install Dependencies -You must have installed `composer` as a global tool as recommended in the [PHP track installation docs][composer-installation-docs]. +The following system dependencies are required: + +- `composer`, as recommended in the [PHP track installation docs][exercism-track-installation-composer]. +- [`bash` shell][gnu-bash] + +Run the following commands to get started with this project: ```shell -bin/fetch-configlet -composer install +bin/fetch-configlet # The official tool for managing Exercism language track repositories +composer install # Required dependencies to develop this track ``` -You now have all tools required to contribute. - ## Running Exercism resources management `bin/configlet` is a tool to manage exercism resources in this track. -See [Building Exercism docs][configlet-docs]. +See [Building Exercism docs][exercism-configlet]. ## Running Unit Test Suite -We use PHPUnit 9.6.x and a shell loop injecting `exemplar.php` as the solution for testing: +The tests are run with PHPUnit. A shell loop injecting `exemplar.php` is provided to ease testing. + +Execute the following command to run the tests: ```shell composer test:run @@ -33,28 +36,26 @@ composer test:run ## Running Style Checker -We use a slightly [modified] version of [PSR-12] and some exceptions: - -```shell -composer lint:check -``` - -To auto-fix the coding styles: +This project use a slightly [modified][local-file-phpcs-config] version of [PSR-12]. +Use the following commands to apply code style: ```shell -composer lint:fix +composer lint:check # Checks the files against the code style rules +composer lint:fix # Automatically fix codestyle issues ``` ## Contributing -- Read the documentation at [Exercism][docs]. -- Follow the [PSR-12] coding style (Exercisms PHP track uses a slightly [modified] version of [PSR-12]). +- Read the documentation at [Exercism][exercism-docs]. +- Follow the [PSR-12] coding style (Exercisms PHP track uses a slightly [modified][local-file-phpcs-config] version of [PSR-12]). - CI is run on all pull requests, it must pass the required checks for merge. - CI is running all tests on PHP 8.0 to PHP 8.2 -[composer-installation-docs]: https://exercism.org/docs/tracks/php/installation#h-install-composer -[configlet-docs]: https://exercism.org/docs/building/configlet -[docs]: https://exercism.org/docs -[modified]: phpcs.xml +[exercism-configlet]: https://exercism.org/docs/building/configlet +[exercism-docs]: https://exercism.org/docs +[exercism-track-home]: https://exercism.org/docs/tracks/php +[exercism-track-installation]: https://exercism.org/docs/tracks/php/installation +[exercism-track-installation-composer]: https://exercism.org/docs/tracks/php/installation#h-install-composer +[gnu-bash]: https://www.gnu.org/software/bash/ +[local-file-phpcs-config]: phpcs.xml [psr-12]: https://www.php-fig.org/psr/psr-12 -[track-docs]: https://exercism.org/docs/tracks/php/installation diff --git a/phpcs.xml b/phpcs.xml index 230c30c4..8c701492 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -18,14 +18,12 @@ - - + + exercises src - -