Skip to content

Commit 67eb797

Browse files
committed
Use PHP 8.3.0 images
1 parent 2bcb419 commit 67eb797

File tree

1 file changed

+96
-66
lines changed

1 file changed

+96
-66
lines changed

README.md

Lines changed: 96 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,34 @@
44

55
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
66
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7+
78
**Table of Contents**
89

910
- [Introduction](#introduction)
1011
- [List of PHP Images](#list-of-php-images)
1112
- [List of Alpine Based PHP Images](#list-of-alpine-based-php-images)
1213
- [List of CI Tools](#list-of-ci-tools)
13-
- [PHP Code Sniffer](#php-code-sniffer)
14-
- [PHP Copy/Paste Detector (PHPCPD)](#php-copypaste-detector-phpcpd)
15-
- [PHP Dead Code Detector](#php-dead-code-detector)
16-
- [SensioLabs Security Checker](#sensiolabs-security-checker)
17-
- [PhpMetrics](#phpmetrics)
18-
- [Psecio Parse](#psecio-parse)
19-
- [PHP VarDump Check](#php-vardump-check)
20-
- [PHP Parallel Lint](#php-parallel-lint)
21-
- [PHP Magic Number Detector (PHPMND)](#php-magic-number-detector-phpmnd)
22-
- [PHP Assumptions](#php-assumptions)
23-
- [churn-php](#churn-php)
24-
- [Fink](#fink)
25-
- [PHPMD](#phpmd)
26-
- [PHP_Testability](#php_testability)
27-
- [composer-normalize](#composer-normalize)
28-
- [infection](#infection)
29-
- [Deptrac](#deptrac)
30-
- [PHP Insights](#php-insights)
31-
- [PHPStan](#phpstan)
32-
- [Local PHP Security Checker](#local-php-security-checker)
33-
- [Pint](#pint)
14+
- [PHP Code Sniffer](#php-code-sniffer)
15+
- [PHP Copy/Paste Detector (PHPCPD)](#php-copypaste-detector-phpcpd)
16+
- [PHP Dead Code Detector](#php-dead-code-detector)
17+
- [SensioLabs Security Checker](#sensiolabs-security-checker)
18+
- [PhpMetrics](#phpmetrics)
19+
- [Psecio Parse](#psecio-parse)
20+
- [PHP VarDump Check](#php-vardump-check)
21+
- [PHP Parallel Lint](#php-parallel-lint)
22+
- [PHP Magic Number Detector (PHPMND)](#php-magic-number-detector-phpmnd)
23+
- [PHP Assumptions](#php-assumptions)
24+
- [churn-php](#churn-php)
25+
- [Fink](#fink)
26+
- [PHPMD](#phpmd)
27+
- [PHP_Testability](#php_testability)
28+
- [composer-normalize](#composer-normalize)
29+
- [infection](#infection)
30+
- [Deptrac](#deptrac)
31+
- [PHP Insights](#php-insights)
32+
- [PHPStan](#phpstan)
33+
- [Local PHP Security Checker](#local-php-security-checker)
34+
- [Pint](#pint)
3435
- [Custom Tools](#custom-tools)
3536
- [How to use images locally](#how-to-use-images-locally)
3637
- [How to Use in Gitlab CI](#how-to-use-in-gitlab-ci)
@@ -40,13 +41,14 @@
4041

4142
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
4243

43-
## Introduction ##
44+
## Introduction
4445

45-
A repository of Docker files to create images from official PHP images (from latest tag per PHP version) with some CI tools installed.
46+
A repository of Docker files to create images from official PHP images (from latest tag per PHP version) with some CI tools installed.
4647

4748
The tools that are installed by Composer are isolated by using different folder per tool and linked to `/usr/local/bin` folder.
4849

49-
## List of PHP Images ##
50+
## List of PHP Images
51+
5052
- umutphp/php-docker-images-for-ci:5.6 (PHP 5.6.6)
5153
- umutphp/php-docker-images-for-ci:7.0 (PHP 7.0.33)
5254
- umutphp/php-docker-images-for-ci:7.1 (PHP 7.1.33)
@@ -56,9 +58,10 @@ The tools that are installed by Composer are isolated by using different folder
5658
- umutphp/php-docker-images-for-ci:8.0 (PHP 8.0.28)
5759
- umutphp/php-docker-images-for-ci:8.1 (PHP 8.1.18)
5860
- umutphp/php-docker-images-for-ci:8.2 (PHP 8.2.5)
59-
- umutphp/php-docker-images-for-ci:8.3 (PHP 8.3-rc)
61+
- umutphp/php-docker-images-for-ci:8.3 (PHP 8.3.0)
62+
63+
## List of Alpine Based PHP Images
6064

61-
## List of Alpine Based PHP Images ##
6265
- umutphp/php-docker-images-for-ci:7.0-alpine (PHP 7.0.33)
6366
- umutphp/php-docker-images-for-ci:7.1-alpine (PHP 7.1.33)
6467
- umutphp/php-docker-images-for-ci:7.2-alpine (PHP 7.2.34)
@@ -67,32 +70,36 @@ The tools that are installed by Composer are isolated by using different folder
6770
- umutphp/php-docker-images-for-ci:8.0-alpine (PHP 8.0.28-apline)
6871
- umutphp/php-docker-images-for-ci:8.1-alpine (PHP 8.1.18-alpine)
6972
- umutphp/php-docker-images-for-ci:8.1-alpine (PHP 8.2.5-alpine)
70-
- umutphp/php-docker-images-for-ci:8.3-alpine (PHP 8.3-rc-alpine)
73+
- umutphp/php-docker-images-for-ci:8.3-alpine (PHP 8.3.0-alpine)
74+
75+
## List of CI Tools
7176

72-
## List of CI Tools ##
77+
#### PHP Code Sniffer
7378

74-
#### PHP Code Sniffer ####
7579
[PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. PHP_CodeSniffer comes with two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations.
7680

7781
```
7882
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpcs /app
7983
```
8084

81-
#### PHP Copy/Paste Detector (PHPCPD) ####
85+
#### PHP Copy/Paste Detector (PHPCPD)
86+
8287
[PHP Copy/Paste Detector (PHPCPD)](https://github.com/sebastianbergmann/phpcpd) is a Copy/Paste Detector (CPD) for PHP code. It checks all the files under the folder given as a parameter and determines the code blocks which are copied and pasted.
8388

8489
```
8590
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpcpd /app
8691
```
8792

88-
#### PHP Dead Code Detector ####
93+
#### PHP Dead Code Detector
94+
8995
[PHP Dead Code Detector](https://github.com/sebastianbergmann/phpdcd) is a Dead Code Detector (DCD) for PHP code. It scans a PHP project for all declared functions and methods and reports those as being "dead code" that are not called at least once.
9096

9197
```
9298
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpdcd /app
9399
```
94100

95-
#### SensioLabs Security Checker ####
101+
#### SensioLabs Security Checker
102+
96103
**Warning** The tool is deprecated and you can use [Local PHP Security Checker](#local-php-security-checker) instead. Don't use this piece of software anymore as the underlying web service will stop working after the end of January 2021.
97104

98105
The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker) is a command line tool that checks if your application uses dependencies with known security vulnerabilities. It uses the [Security Check Web service](https://security.symfony.com/) and the [Security Advisories Database](https://github.com/FriendsOfPHP/security-advisories).
@@ -101,145 +108,166 @@ The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker
101108
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 security-checker security:check /app
102109
```
103110

104-
#### PhpMetrics ####
111+
#### PhpMetrics
112+
105113
[PhpMetrics](https://www.phpmetrics.org/) provides software metrics about PHP project and classes. It generates readable and accessible reports about maintainability, quality and complexity of a source code.
106114

107115
```
108116
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpmetrics /app
109117
```
110118

111-
#### Psecio Parse ####
119+
#### Psecio Parse
120+
112121
[Psecio Parse](https://github.com/psecio/parse) scanner is a static scanning tool to review your PHP code for potential security-related issues. . It requires atleast PHP 7.0.
113122

114123
```
115124
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 psecio-parse scan /app
116125
```
117-
#### PHP VarDump Check ####
126+
127+
#### PHP VarDump Check
128+
118129
[PHP VarDump Check](https://github.com/php-parallel-lint/PHP-Var-Dump-Check) is a PHP console application for finding forgotten variable dump lines. It supports PHP build in method print_r, var_dump and var_export methods and also methods from Tracy debugger, Ladybug, Symfony, Laravel, Doctrine and Zend Framework.
119130

120131
```
121132
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 var-dump-check /app
122133
```
123134

124-
#### PHP Parallel Lint ####
135+
#### PHP Parallel Lint
136+
125137
[PHP Parallel Lint](https://github.com/php-parallel-lint/PHP-Parallel-Lint) checks syntax of PHP files faster than serial check with a fancier output. Running parallel jobs in PHP is inspired by Nette framework tests.
126138

127139
```
128140
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 parallel-lint /app
129141
```
130142

131-
#### PHP Magic Number Detector (PHPMND) ####
143+
#### PHP Magic Number Detector (PHPMND)
144+
132145
[PHP Magic Number Detector (PHPMND)](https://github.com/povils/phpmnd) is a tool that aims to help you to detect [magic numbers](https://github.com/povils/phpmnd#what-is-a-magic-number) in your PHP code. By default 0 and 1 are not considered to be magic numbers. This tool is incompatible with PHP 8.0.
133146

134147
```
135148
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpmnd /app
136149
```
137150

138-
#### PHP Assumptions ####
151+
#### PHP Assumptions
152+
139153
[PHP Assumptions](https://github.com/rskuipers/php-assumptions) is the result of a proof of concept inspired by the "From assumptions to assertions" blog post. It's a static code analysis tool doing checks for weak assumptions.
140154

141155
```
142156
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpa /app
143157
```
144158

145-
#### churn-php ####
159+
#### churn-php
160+
146161
[churn-php](https://github.com/bmitch/churn-php) is a package that helps you identify php files in your project that could be good candidates for refactoring. It requires atleast PHP 7.1.
147162

148163
```
149164
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 churn run src /app
150165
```
151166

152-
#### Fink ####
167+
#### Fink
168+
153169
[Fink](https://github.com/dantleech/fink) (pronounced "Phpink") is a command line tool for checking HTTP links written in PHP. It requires atleast PHP 7.1.
154170

155171
```
156172
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 fink http://yoursite.domain
157173
```
158174

159-
#### PHPMD ####
175+
#### PHPMD
176+
160177
[PHPMD](https://github.com/phpmd/phpmd) is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. [PHPMD](https://github.com/phpmd/phpmd) can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
161178

162179
```
163180
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpmd /app text codesize,unusedcode,naming
164181
```
165182

166-
#### PHP_Testability ####
183+
#### PHP_Testability
184+
167185
[PHP_Testability](https://github.com/edsonmedina/php_testability) analyses and produces a report with testability issues of a php codebase. It requires atleast PHP 7.0.
168186

169187
```
170188
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 testability /app -o report
171189
```
172190

173-
#### composer-normalize ####
191+
#### composer-normalize
192+
174193
[composer-normalize](https://github.com/ergebnis/composer-normalize) Provides a composer plugin for normalizing `composer.json`. It requires atleast PHP 7.1.
175194

176195
```
177196
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 cd /app && composer normalize
178197
```
179198

180-
#### infection ####
199+
#### infection
200+
181201
[Infection](https://infection.github.io/) is a PHP mutation testing framework based on AST (Abstract Syntax Tree) mutations. It works as a CLI tool and can be executed from your project’s root.
182202

183203
```
184204
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 infection
185205
```
186206

187-
#### Deptrac ####
207+
#### Deptrac
208+
188209
[Deptrac](https://github.com/sensiolabs-de/deptrac) is a static code analysis tool that helps to enforce rules for dependencies between software layers in your PHP projects. It requires atleast PHP 7.1.
189210

190-
#### PHP Insights ####
191-
[PHP Insights](https://phpinsights.com/) was carefully crafted to simplify the analysis of your code directly from your terminal. It requires atleast PHP 7.2 and It is not supporting PHP 8.0 for now.
211+
#### PHP Insights
212+
213+
[PHP Insights](https://phpinsights.com/) was carefully crafted to simplify the analysis of your code directly from your terminal. It requires atleast PHP 7.2 and It is not supporting PHP 8.0 for now.
192214

193215
```
194216
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.3 phpinsights
195217
```
196218

197-
#### PHPStan ####
219+
#### PHPStan
220+
198221
[PHPStan](https://github.com/phpstan/phpstan) focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It requires atleast PHP 7.1.
199222

200223
```
201224
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.3 phpstan analyse
202225
```
203226

204-
#### Local PHP Security Checker ####
227+
#### Local PHP Security Checker
228+
205229
[The Local PHP Security Checker](https://github.com/fabpot/local-php-security-checker) is a command line tool that checks if your PHP application depends on PHP packages with known security vulnerabilities. It uses the [Security Advisories Database](https://github.com/FriendsOfPHP/security-advisories).
206230

207231
```
208232
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.3 local-php-security-checker --path=/app/composer.lock
209233
```
210234

211-
#### Pint ####
235+
#### Pint
236+
212237
[Pint](https://github.com/laravel/pint) is an opinionated PHP code style fixer for minimalists. Pint is built on top of [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) and makes it simple to ensure that your code style stays clean and consistent. Pint requires atleast PHP 8.0.
213238

214239
```
215240
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:8.1 pint
216241
```
217242

218-
## Custom Tools ##
243+
## Custom Tools
244+
219245
- **Gitignore Checker:** `gitignore_checker` checks the .gitignore file under the directory that the command executed and finds if there are file or files both in the git ignore file and the repository.
220-
- **Git Merge Conflict Marker Checker:** `merge_conflict_checker` checks all the files in the given folder (current folder is checked if not given) to find the forgotten merge conflict markers like "<<<<<<< HEAD".
246+
- **Git Merge Conflict Marker Checker:** `merge_conflict_checker` checks all the files in the given folder (current folder is checked if not given) to find the forgotten merge conflict markers like "<<<<<<< HEAD".
247+
248+
## How to use images locally
221249

222-
## How to use images locally ##
223-
* A sample execution for [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer);
250+
- A sample execution for [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer);
224251

225252
```
226253
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 phpcs /app
227254
```
228255

229-
* A sample execution for [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker);
256+
- A sample execution for [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker);
230257

231258
```
232259
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 security-checker security:check /app/composer.lock
233260
```
234261

235-
* A sample execution for [Psecio Parse](https://github.com/psecio/parse);
262+
- A sample execution for [Psecio Parse](https://github.com/psecio/parse);
236263

237264
```
238265
docker run -v /path/to/project:/app umutphp/php-docker-images-for-ci:7.1 /root/.composer/vendor/bin/psecio-parse scan /app
239266
```
240267

241-
## How to Use in Gitlab CI ##
242-
You need to enable Docker executors on Gitlab CI. You can find sample job definitions for executing the tools on Gitlab CI pipeline for your repo.
268+
## How to Use in Gitlab CI
269+
270+
You need to enable Docker executors on Gitlab CI. You can find sample job definitions for executing the tools on Gitlab CI pipeline for your repo.
243271

244272
A sample job definition for [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer);
245273

@@ -249,7 +277,7 @@ code_sniffer:
249277
image: umutphp/php-docker-images-for-ci:7.1
250278
script:
251279
- cd /path/to/code/base
252-
- phpcs
280+
- phpcs
253281
```
254282

255283
A sample job definition for [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker);
@@ -272,7 +300,8 @@ security_psecio_parse:
272300
- psecio-parse scan /path/to/your/codebase/
273301
```
274302

275-
## How to Use in CircleCI ##
303+
## How to Use in CircleCI
304+
276305
You can make some static code checks before bulding and testing your application on CircleCI.
277306

278307
```
@@ -285,19 +314,19 @@ jobs:
285314
- image: umutphp/php-docker-images-for-ci:7.2
286315
steps:
287316
- checkout
288-
- run:
317+
- run:
289318
name: Composer-normalize
290319
no_output_timeout: 20m
291320
command: composer normalize --dry-run
292-
- run:
321+
- run:
293322
name: PHP-Lint
294323
no_output_timeout: 20m
295324
command: parallel-lint --exclude vendor .
296-
- run:
325+
- run:
297326
name: Var-Dump-Check
298327
no_output_timeout: 20m
299328
command: var-dump-check .
300-
- run:
329+
- run:
301330
name: Merge-Conflict-Checker
302331
no_output_timeout: 20m
303332
command: merge_conflict_checker .
@@ -308,9 +337,10 @@ workflows:
308337
- checks
309338
```
310339

340+
## How To Contribute
311341

312-
## How To Contribute ##
313342
Please read the instructions in [CONTRIBUTING.md](CONTRIBUTING.md) file.
314343

315-
## Code of Conduct ##
344+
## Code of Conduct
345+
316346
See [CODE_OF_CONDUCT](CODE_OF_CONDUCT) for information.

0 commit comments

Comments
 (0)