1 # Select docker image from https://hub.docker.com/_/php/
4 # Select what we should cache
10 # Install git, the docker php image doesn't have it installed by default
12 - apt-get install git -yqq
13 - apt-get install zip -yqq
14 # Enable necessary php extensions
15 - docker-php-ext-enable curl && docker-php-ext-enable json && docker-php-ext-enable zip && docker-php-ext-enable mbstring && docker-php-ext-enable gd && docker-php-ext-enable pdo_mysql
17 - curl -sS https://getcomposer.org/installer | php
18 # Create composer.json file manually, since this is a project without any non-dev dependencies yet
19 - php composer.phar require --dev php-parallel-lint/php-parallel-lint
20 - php composer.phar require --dev friendsofphp/php-cs-fixer
21 # Install all project dependencies
22 - php composer.phar install
25 test_app_phpdefaultversion:
27 - ./vendor/bin/parallel-lint --exclude vendor .
28 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
30 job_lint_app_phpnextversion:
33 - ./vendor/bin/parallel-lint --exclude vendor .
34 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
37 # Run same tests with older supported versions
41 - ./vendor/bin/parallel-lint --exclude vendor .
42 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
47 - ./vendor/bin/parallel-lint --exclude vendor .
48 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
53 - ./vendor/bin/parallel-lint --exclude vendor .
54 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
59 - ./vendor/bin/parallel-lint --exclude vendor .
60 - ./vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2