Skip to content

Commit c76f3bb

Browse files
committed
Update readme
1 parent d49d53f commit c76f3bb

File tree

10 files changed

+33
-292
lines changed

10 files changed

+33
-292
lines changed

.readme/images/cover.png

402 KB
Loading

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=7.2
1+
ARG PHP_VERSION=8
22
ARG COMPOSER_VERSION=2
33

44
FROM composer:${COMPOSER_VERSION} as composer

README.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
# Composer PHP golden image
1+
# Composer PHP docker image
22
[![Build](https://github.com/devgine/composer-php/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/devgine/composer-php/actions/workflows/build.yaml)
33
[![License](https://img.shields.io/github/license/devgine/composer-php)](https://github.com/devgine/composer-php/blob/main/LICENSE)
44
![GitHub top language](https://img.shields.io/github/languages/top/devgine/composer-php)
55
[![Packages retention policy](https://github.com/devgine/composer-php/actions/workflows/packages-retention-policy.yaml/badge.svg?branch=main)](https://github.com/devgine/composer-php/actions/workflows/packages-retention-policy.yaml)
6+
7+
![cover.png](.readme/images/cover.png)
8+
69
## About
710
This repository is a docker image based on official php, composer and alpine docker images to help you to build and test your PHP projects with different PHP version.<br>
8-
This docker image contains a necessary tools you need to analyze and test your PHP project (xdebug, phpunit, phpstan, php-cs-fixer, phpmd, phpcpd and rector).<br>
11+
This docker image contains a necessary tools you need to analyze and test your PHP project
12+
* xdebug
13+
* phpunit
14+
* phpstan
15+
* psalm
16+
* phpcs
17+
* php-cs-fixer
18+
* phpmd
19+
* phpcpd (available from php 7.3 version)
20+
* rector
21+
922
Below is the list of docker images available by PHP versions:
1023

1124
| PHP version | Docker image tags |
1225
|-------------|-------------------------------------------------|
13-
| PHP 8.2 | `ghcr.io/devgine/composer-php:latest` |
26+
| PHP 8.3 | `ghcr.io/devgine/composer-php:latest` |
1427
| PHP 8.2 | `ghcr.io/devgine/composer-php:v2-php8.2-alpine` |
1528
| PHP 8.1 | `ghcr.io/devgine/composer-php:v2-php8.1-alpine` |
1629
| PHP 8.0 | `ghcr.io/devgine/composer-php:v2-php8.0-alpine` |
1730
| PHP 7.4 | `ghcr.io/devgine/composer-php:v2-php7.4-alpine` |
1831
| PHP 7.3 | `ghcr.io/devgine/composer-php:v2-php7.3-alpine` |
1932
| PHP 7.2 | `ghcr.io/devgine/composer-php:v2-php7.2-alpine` |
2033

21-
## Components
22-
All image tags are based on alpine OS.<br>
23-
Below is the list of tools with their preinstalled version depending on the PHP version.
24-
25-
| Image tag | PHP | Composer | PHP Unit | XDebug | Rector | PHPStan | PHP CS FIXER | PHP MD | PHP CPD |
26-
|---------------------------------------------|-----|----------|----------|--------|--------|---------|--------------|--------|---------|
27-
| [latest](doc/latest.md) | 8.2 | 2.* | 9.5 | 3.2.1 | 0.16 | 1.10 | 3.17 | 2.13 | 6.0 |
28-
| [v2-php8.2-alpine](doc/v2-php8.2-alpine.md) | 8.2 | 2.* | 9.5 | 3.2.1 | 0.16 | 1.10 | 3.17 | 2.13 | 6.0 |
29-
| [v2-php8.1-alpine](doc/v2-php8.1-alpine.md) | 8.1 | 2.* | 9.5 | 3.2.1 | 0.16 | 1.10 | 3.17 | 2.13 | 6.0 |
30-
| [v2-php8.0-alpine](doc/v2-php8.0-alpine.md) | 8.0 | 2.* | 9.5 | 3.2.1 | 0.16 | 1.10 | 3.17 | 2.13 | 6.0 |
31-
| [v2-php7.4-alpine](doc/v2-php7.4-alpine.md) | 7.4 | 2.* | 8.5 | 3.1.6 | 0.16 | 1.10 | 3.17 | 2.13 | 6.0 |
32-
| [v2-php7.3-alpine](doc/v2-php7.3-alpine.md) | 7.3 | 2.* | 8.5 | 3.1.6 | 0.16 | 1.10 | 3.4 | 2.13 | 6.0 |
33-
| [v2-php7.2-alpine](doc/v2-php7.2-alpine.md) | 7.2 | 2.* | 8.5 | 3.1.6 | 0.16 | 1.10 | 3.4 | 2.13 | -- |
3434

3535
## Usage
3636
### Install from the command line
3737
```shell
38-
docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-php:latest sh
38+
docker run -ti -v LOCAL_PROJECT_DIR:/var/www/composer ghcr.io/devgine/composer-php:latest sh
3939
```
4040
[All versions](https://github.com/devgine/composer-php/pkgs/container/composer-php/versions)
4141
### Use as base image in Dockerfile
@@ -54,6 +54,7 @@ EXPOSE 8080
5454
### Use components
5555
Inside the container, you can run any tool you need from any working directory.<br>
5656
Global vendor binaries are added to the PATH environment.
57+
5758
#### Composer
5859
```shell
5960
composer --help
@@ -70,6 +71,14 @@ rector --help
7071
```shell
7172
phpstan --help
7273
```
74+
#### Psalm
75+
```shell
76+
psalm --help
77+
```
78+
#### PHP Code sniffer
79+
```shell
80+
phpcs --help
81+
```
7382
#### PHP Coding Standards Fixer
7483
```shell
7584
php-cs-fixer --help
@@ -113,7 +122,7 @@ jobs:
113122
strategy:
114123
fail-fast: false
115124
matrix:
116-
tag: ['v2-php8.2-alpine', 'v2-php8.1-alpine', 'v2-php8.0-alpine', 'v2-php7.4-alpine']
125+
tag: ['v2-php8.3-alpine', 'v2-php8.2-alpine', 'v2-php8.1-alpine', 'v2-php8.0-alpine', 'v2-php7.4-alpine']
117126
container:
118127
image: ghcr.io/devgine/composer-php:${{ matrix.tag }}
119128
steps:
@@ -124,7 +133,7 @@ jobs:
124133

125134
### Gitlab CI
126135
```yaml
127-
phpstan:
136+
tests:
128137
image: ghcr.io/devgine/composer-php:latest
129138
...
130139
script:
@@ -133,10 +142,10 @@ phpstan:
133142
134143
An example with matrix strategy
135144
```yaml
136-
phpstan:
145+
tests:
137146
parallel:
138147
matrix:
139-
TAG: ['v2-php8.2-alpine', 'v2-php8.1-alpine', 'v2-php8.0-alpine', 'v2-php7.4-alpine']
148+
TAG: ['v2-php8.3-alpine', 'v2-php8.2-alpine', 'v2-php8.1-alpine', 'v2-php8.0-alpine', 'v2-php7.4-alpine']
140149
image: ghcr.io/devgine/composer-php:${TAG}
141150
...
142151
script:
@@ -149,6 +158,8 @@ phpstan:
149158
* [PHP Unit](https://symfony.com/doc/current/components/phpunit_bridge.html)
150159
* [Rector](https://packagist.org/packages/rector/rector)
151160
* [PHPStan](https://phpstan.org/)
161+
* [Psalm](https://psalm.dev/docs/)
162+
* [PHP CS](https://github.com/squizlabs/PHP_CodeSniffer/wiki)
152163
* [PHP Coding Standards Fixer](https://cs.symfony.com/)
153164
* [PHP Mess Detector](https://phpmd.org/)
154165
* [PHP Copy Past detector](https://github.com/sebastianbergmann/phpcpd)

doc/latest.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

doc/v2-php7.2-alpine.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

doc/v2-php7.3-alpine.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

doc/v2-php7.4-alpine.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

doc/v2-php8.0-alpine.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

doc/v2-php8.1-alpine.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)