Skip to content

Commit eaf58b6

Browse files
Update Contributing guide and Docker setup
1 parent 8e4d48c commit eaf58b6

File tree

6 files changed

+24
-18
lines changed

6 files changed

+24
-18
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
If you want to contribute to this library, clone this project, then:
22

3-
- Run `composer install` to install dependencies.
4-
- Run `./install-git-hooks.sh` to install the pre-commit hook which fixes coding style problems automatically for you.
5-
6-
Take a look at `.travis.yml` to find out which versions of Symfony are currently supported by this library. The easiest way to find out if your code changes are compatible with different versions of Symfony is to register your cloned repository at Travis. Then push your code to GitHub and wait for the Travis build to finish. If the build fails for a particular Symfony version you can reproduce the build locally by exporting the same environment variables as Travis does and running the install and test scripts on your machine.
3+
- Run `bin/install` to download relevant Docker images and install Composer dependencies.
4+
- Run `bin/fix` to fix code style issues
5+
- Run `bin/test` to run the tests

bin/install

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
echo "Creating .env file"
6+
printf "HOST_UID=%s\nHOST_GID=%s\n" "$(id -u)" "$(id -g)" > .env
7+
8+
echo "Pulling Docker images"
9+
docker-compose pull
10+
11+
echo "Installing Composer dependencies"
12+
docker-compose run --rm composer install --ignore-platform-reqs --prefer-dist
13+
14+
echo ""
15+
echo "Done"
16+
echo ""

bin/php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22

33
set -eu
44

5-
# Copy user and group ID into .env file
6-
printf "HOST_UID=%s\nHOST_GID=%s\n" "$(id -u)" "$(id -g)" > .env
7-
85
docker-compose run --rm php php "$@"

bin/test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
docker-compose run --rm php php vendor/bin/behat

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ services:
99
env_file:
1010
- .env
1111
user: ${HOST_UID}:${HOST_GID}
12-
init: true
1312

1413
php:
1514
image: php:7.4-cli-alpine
@@ -19,4 +18,3 @@ services:
1918
env_file:
2019
- .env
2120
user: ${HOST_UID}:${HOST_GID}
22-
init: true

install-git-hooks.sh

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

0 commit comments

Comments
 (0)