Skip to content

Commit fec9f2e

Browse files
authored
Improve travis (#2)
* Improve travis * Fix future php-cs-fixer config changes * Skip php-cs-fixer env checks
1 parent d646ad2 commit fec9f2e

3 files changed

Lines changed: 32 additions & 16 deletions

File tree

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ return PhpCsFixer\Config::create()
1515
'array_indentation' => true,
1616
'array_syntax' => ['syntax' => 'short'],
1717
'backtick_to_shell_exec' => true,
18-
'blank_line_before_return' => true,
18+
'blank_line_before_statement' => true,
1919
'class_keyword_remove' => false,
2020
'combine_consecutive_issets' => true,
2121
'combine_consecutive_unsets' => true,

.travis.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
language: php
22

3-
php:
4-
- 7.2
5-
- nightly
6-
73
env:
8-
matrix:
9-
-
10-
- DEPENDENCIES=--prefer-lowest
4+
global:
5+
- DEFAULT_COMPOSER_FLAGS="--optimize-autoloader --no-interaction --no-progress"
6+
- COMPOSER_FLAGS=""
7+
8+
before_install:
9+
- alias composer=composer\ --no-interaction && composer selfupdate
1110

1211
cache:
1312
directories:
@@ -18,11 +17,28 @@ matrix:
1817
allow_failures:
1918
- php: nightly
2019

21-
before_install:
22-
- alias composer=composer\ --no-interaction && composer selfupdate
23-
24-
install:
25-
- travis_retry composer update --no-progress --profile --no-scripts --no-suggest $DEPENDENCIES
20+
jobs:
21+
include:
22+
- &STANDARD_TEST_JOB
23+
stage: Test
24+
php: 7.2
25+
install:
26+
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
27+
- composer info -D | sort
28+
script:
29+
- vendor/bin/grumphp run
30+
-
31+
<<: *STANDARD_TEST_JOB
32+
stage: Test
33+
php: 7.2
34+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
35+
-
36+
<<: *STANDARD_TEST_JOB
37+
stage: Test
38+
php: nightly
39+
env: COMPOSER_FLAGS="--ignore-platform-reqs" PHP_CS_FIXER_IGNORE_ENV=1 PHP_CS_FIXER_FUTURE_MODE=1
40+
script:
41+
- vendor/bin/grumphp run
2642

27-
script:
28-
- vendor/bin/grumphp run
43+
allow_failures:
44+
- php: nightly

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Since handling the exceptions is up to the framework, here is a list of known fr
1717
## Installation
1818

1919
```sh
20-
composer require --dev phpro/api-problem
20+
composer require phpro/api-problem
2121
```
2222

2323
## Usage

0 commit comments

Comments
 (0)