You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Service |[PHP-FPM](https://www.php.net/manual/en/install.fpm.php)| PHP with FastCGI Process Manager |
40
-
| Miscelaneous |[Make](https://www.gnu.org/software/make/)| Allows to execute commands defined on a _Makefile_|
41
-
| Quality Assurance |[PHP-Parallel-Lint](https://github.com/php-parallel-lint/PHP-Parallel-Lint)| Allows to check the syntax of PHP files in parallel |
42
-
| Quality Assurance |[PHPCS/PHPCBF](https://github.com/PHPCSStandards/PHP_CodeSniffer/)| Allows to check and fix coding style issues |
43
-
| Quality Assurance |[PHPStan](https://phpstan.org/)| Allows to perform static analysis of your application looking for issues |
44
-
| Quality Assurance |[PHPUnit](https://phpunit.de/)| The PHP Testing Framework |
31
+
This project was built with [Dockerized PHP](https://github.com/fonil/dockerized-php), a lightweight dockerized environment to build PHP applications.
|`phpcs`| Runs **PHP Check Style** command following the PSR-12 |
76
+
|`phpcbf`| Runs **PHP Code Beautifier** and **Fixer** command following the PSR-12|
77
+
|`phpstan`| Runs **PHPStan** with the specs defined at `phpstan.neon` configuration file|
78
+
|`phpunit`| Runs **PHPUnit** with the specs defined at `phpunit.xml` configuration file|
79
+
|`tests`| Runs **PHPUnit** without code coverage support|
80
+
|`coverage`| Runs **PHPUnit** with **PCOV** code coverage support |
94
81
95
-
#####Makefile
82
+
#### Makefile
96
83
97
84
Additionally a *Makefile* is provided with frequently used commands:
98
85
@@ -117,22 +104,49 @@ Additionally a *Makefile* is provided with frequently used commands:
117
104
· phpstan QA: <composer phpstan>
118
105
· tests QA: <composer tests>
119
106
· coverage QA: <composer coverage>
120
-
· clean-cache QA: <composer clean-cache>
121
107
```
122
108
123
109
110
+
> [!NOTE]
111
+
>
124
112
> This file is really useful when you create a container with a project based on this repository and you want to run those commands from outside the container, directly from your *host*. To do so just copy and paste the included steps on your main *Makefile* and adjust the constants accordingly.
125
113
114
+
##### Installing Dependencies
115
+
116
+
```bash
117
+
$ make composer-install
118
+
```
119
+
120
+
##### Running the Test Cases
121
+
122
+
###### Default command
123
+
124
+
```bash
125
+
$ make tests
126
+
```
127
+
128
+
###### Run only Unit testsuite
129
+
130
+
```bash
131
+
$ make tests testsuite=Unit
132
+
```
133
+
134
+
###### Filter a specific test
135
+
136
+
```bash
137
+
$ make tests filter="checkInvokeMethod tests/Unit/Providers/FooTest.php"
138
+
```
126
139
127
140
#### Volumes
128
141
129
142
##### Coverage report in HTML
130
143
131
144
Coverage report in HTML is generated on a root folder `/coverage`
132
145
133
-
146
+
> [!TIP]
147
+
>
134
148
> If you want the report is generated on a different path, just update accordingly the `composer.json` file under the section `scripts`
0 commit comments