mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Create readme
This commit is contained in:
parent
a5241d9078
commit
0cff61e7e7
43
README.md
43
README.md
@ -1,16 +1,17 @@
|
||||
<p align="center">
|
||||
<img src="https://avatars.githubusercontent.com/u/5228734?s=280&v=4" alt="NFQ Group"/>
|
||||
</p>
|
||||
|
||||
# GildedRose Kata - PHP Version
|
||||
|
||||
## Installation
|
||||
|
||||
The kata uses:
|
||||
##### The kata uses:
|
||||
|
||||
- [8.0+](https://www.php.net/downloads.php)
|
||||
- [Composer](https://getcomposer.org)
|
||||
|
||||
Recommended:
|
||||
##### Recommended:
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
|
||||
@ -27,17 +28,17 @@ or
|
||||
git clone https://github.com/thang-tran-nfq/GildedRose-Refactoring-Kata.git
|
||||
```
|
||||
|
||||
Setup docker-compose
|
||||
##### Setup docker-compose
|
||||
```shell script
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Exec the docker container
|
||||
##### Exec the docker container
|
||||
```shell script
|
||||
docker exec -it php-cli bash
|
||||
```
|
||||
|
||||
Install all the dependencies using composer
|
||||
##### Install all the dependencies using composer
|
||||
|
||||
```shell script
|
||||
cd ./GildedRose-Refactoring-Kata
|
||||
@ -46,7 +47,7 @@ composer install
|
||||
|
||||
## Dependencies
|
||||
|
||||
The project uses composer to install:
|
||||
##### The project uses composer to install:
|
||||
|
||||
- [PHPUnit](https://phpunit.de/)
|
||||
- [ApprovalTests.PHP](https://github.com/approvals/ApprovalTests.php)
|
||||
@ -77,7 +78,7 @@ The project uses composer to install:
|
||||
|
||||
## Fixture
|
||||
|
||||
To run the fixture from the php directory:
|
||||
##### To run the fixture from the php directory:
|
||||
|
||||
```shell
|
||||
php .\fixtures\texttest_fixture.php 10
|
||||
@ -94,13 +95,6 @@ project run:
|
||||
composer tests
|
||||
```
|
||||
|
||||
A Windows a batch file has been created, like an alias on Linux/Mac (e.g. `alias pu="composer tests"`), the same
|
||||
PHPUnit `composer tests` can be run:
|
||||
|
||||
```shell script
|
||||
pu.bat
|
||||
```
|
||||
|
||||
### Tests with Coverage Report
|
||||
|
||||
To run all test and generate a html coverage report run:
|
||||
@ -127,13 +121,6 @@ To check code, but not fix errors:
|
||||
composer check-cs
|
||||
```
|
||||
|
||||
On Windows a batch file has been created, like an alias on Linux/Mac (e.g. `alias cc="composer check-cs"`), the same
|
||||
PHPUnit `composer check-cs` can be run:
|
||||
|
||||
```shell script
|
||||
cc.bat
|
||||
```
|
||||
|
||||
### Fix Code
|
||||
|
||||
ECS provides may code fixes, automatically, if advised to run --fix, the following script can be run:
|
||||
@ -142,13 +129,6 @@ ECS provides may code fixes, automatically, if advised to run --fix, the followi
|
||||
composer fix-cs
|
||||
```
|
||||
|
||||
On Windows a batch file has been created, like an alias on Linux/Mac (e.g. `alias fc="composer fix-cs"`), the same
|
||||
PHPUnit `composer fix-cs` can be run:
|
||||
|
||||
```shell script
|
||||
fc.bat
|
||||
```
|
||||
|
||||
## Static Analysis
|
||||
|
||||
PHPStan is used to run static analysis checks:
|
||||
@ -157,11 +137,4 @@ PHPStan is used to run static analysis checks:
|
||||
composer phpstan
|
||||
```
|
||||
|
||||
On Windows a batch file has been created, like an alias on Linux/Mac (e.g. `alias ps="composer phpstan"`), the same
|
||||
PHPUnit `composer phpstan` can be run:
|
||||
|
||||
```shell script
|
||||
ps.bat
|
||||
```
|
||||
|
||||
**Happy coding**!
|
||||
|
||||
Loading…
Reference in New Issue
Block a user