Skip to content

Commit 2f53d08

Browse files
committed
Modify docs
1 parent 1e7ba89 commit 2f53d08

File tree

1 file changed

+29
-35
lines changed

1 file changed

+29
-35
lines changed

CONTRIBUTING.md

+29-35
Original file line numberDiff line numberDiff line change
@@ -23,49 +23,43 @@ make test
2323

2424
### Switching PHP versions
2525

26+
While development, you might need to support multiple versions of PHP. You can run tests locally in a Docker container in a different PHP version.
2627

2728
You can switch the PHP version of the docker runtime by changing the `PHP_VERSION` environment variable in the `.env` file.
2829

2930
If you have no `.env` file yet, create it by copying `.env.dist` to `.env`.
3031

31-
After changing the PHP Version you need to run `make clean_all up` to start the new container with new version.
32+
After changing the PHP Version you need to run `make clean_all up cli` or `make down up cli` to start the new container with new version.
3233

3334
Example:
3435

3536
```
36-
$ echo "PHP_VERSION=8.1" > .env
37-
$ make clean_all up cli
38-
Stopping yii2-openapi_php_1 ... done # TODO
39-
Stopping yii2-openapi_maria_1 ... done
40-
Stopping yii2-openapi_postgres_1 ... done
41-
Stopping yii2-openapi_mysql_1 ... done
42-
Removing yii2-openapi_php_1 ... done
43-
Removing yii2-openapi_maria_1 ... done
44-
Removing yii2-openapi_postgres_1 ... done
45-
Removing yii2-openapi_mysql_1 ... done
46-
Removing network yii2-openapi_default
47-
Creating network "yii2-openapi_default" with driver "bridge"
48-
Creating yii2-openapi_maria_1 ... done
49-
Creating yii2-openapi_mysql_1 ... done
50-
Creating yii2-openapi_postgres_1 ... done
51-
Creating yii2-openapi_php_1 ... done
37+
$ echo "PHP_VERSION=8.2" > .env
38+
$ make down up cli
39+
docker-compose down --remove-orphans
40+
Stopping yii2-fractal_php_1 ... done
41+
Stopping yii2-fractal_pgsql_1 ... done
42+
Removing yii2-fractal_php_1 ... done
43+
Removing yii2-fractal_pgsql_1 ... done
44+
Removing network yii2-fractal_default
45+
docker-compose build
46+
...
47+
...
48+
...
49+
docker-compose up -d
50+
...
51+
...
52+
...
5253
docker-compose exec php bash
53-
54-
root@f9928598f841:/app# php -v
55-
56-
PHP 8.1.27 (cli) (built: Jan 26 2022 18:08:44) ( NTS )
57-
Copyright (c) The PHP Group
58-
Zend Engine v3.4.0, Copyright (c) Zend Technologies
59-
with Zend OPcache v8.1.27, Copyright (c), by Zend Technologies
60-
with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans
54+
_ _ __ _
55+
(_|_)/ _| | |
56+
_ _ _ _| |_ _ __ __ _ _ __ ___ _____ _____ _ __| | __
57+
| | | | | | _| '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
58+
| |_| | | | | | | | (_| | | | | | | __/\ V V / (_) | | | <
59+
\__, |_|_|_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\
60+
__/ |
61+
|___/
62+
63+
PHP version: 8.2.20
64+
root@713d31b5ed8c:/app#
6165
```
62-
63-
64-
65-
66-
### Testing # todo remove
67-
68-
- Clone project
69-
- Run `make up`
70-
- Run once `make installdocker`
71-
- Run `make testdocker` or `make cli` and inside docker env `make test`

0 commit comments

Comments
 (0)