-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contribution guideline (draft) and multiple PHP containers (#58)
- Loading branch information
1 parent
68b9776
commit e065cf9
Showing
6 changed files
with
88 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ build/ | |
|
||
.php_cs.dist | ||
.php-cs-fixer.dist.php | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributing to PHP Codec | ||
|
||
|
||
## Dev environment | ||
|
||
PHP Codec comes with a containerized environment in order to make | ||
contribution really easy. | ||
The container comes with `composer` and `xdebug` installed. | ||
|
||
Run | ||
|
||
```shell | ||
make run | ||
``` | ||
|
||
and you're in. By default, `run` will build and start the container with the | ||
lowest PHP version supported. | ||
To start a container with a different version, choose one of the other targets. | ||
|
||
```shell | ||
make run-php7.4 # *default | ||
make run-php8.0 | ||
make run-php8.1 | ||
make run-php8.2 | ||
``` | ||
|
||
Each `run-php*` target will remove the `composer.lock` file and execute a | ||
clean `composer install`. | ||
|
||
To execute all the testing targets, run the following from the inside | ||
of the container: | ||
|
||
```shell | ||
make ci | ||
``` | ||
|
||
It will run PHPUnit tests, PHPStan, Psalm and the code style checker. | ||
Consult `Makefile` to learn which are the other targets that allow to run | ||
those checks singularly. | ||
|
||
|
||
## How to contribute | ||
|
||
Open an issue before each non-trivial PR. | ||
Describe what are your needs and your proposal, if any. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
version: "3.8" | ||
|
||
services: | ||
php: | ||
php74: &base | ||
build: | ||
context: docker/ | ||
args: | ||
PHP_IMAGE: php:7.4 | ||
XDEBUG: xdebug-3.1.5 | ||
volumes: | ||
- .:/home/dev/lib | ||
tty: true | ||
user: dev | ||
working_dir: /home/dev/lib | ||
php80: | ||
<<: *base | ||
build: | ||
context: docker/ | ||
args: | ||
PHP_IMAGE: php:8.0 | ||
php81: | ||
<<: *base | ||
build: | ||
context: docker/ | ||
args: | ||
PHP_IMAGE: php:8.1 | ||
php82: | ||
<<: *base | ||
build: | ||
context: docker/ | ||
args: | ||
PHP_IMAGE: php:8.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters