Skip to content

Commit 1f3d8d4

Browse files
authored
Merge pull request #24 from php-api-clients/dependabot/composer/api-clients/test-utilities-5.4.0
Bump api-clients/test-utilities from 3.0.1 to 5.4.0
2 parents 492d3d1 + f826926 commit 1f3d8d4

File tree

12 files changed

+3583
-863
lines changed

12 files changed

+3583
-863
lines changed

.php_cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php declare(strict_types=1);
2+
3+
use ApiClients\Tools\CsFixerConfig\PhpCsFixerConfig;
4+
use PhpCsFixer\Config;
5+
6+
return (function (): Config
7+
{
8+
$paths = [
9+
__DIR__ . DIRECTORY_SEPARATOR . 'src',
10+
__DIR__ . DIRECTORY_SEPARATOR . 'tests',
11+
__DIR__ . DIRECTORY_SEPARATOR . 'examples',
12+
];
13+
14+
return PhpCsFixerConfig::create()
15+
->setFinder(
16+
PhpCsFixer\Finder::create()
17+
->in($paths)
18+
->append($paths)
19+
)
20+
->setUsingCache(false)
21+
;
22+
})();

.travis.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
language: php
2-
sudo: false
32

43
## Cache composer bits
54
cache:
65
directories:
7-
- $HOME/.composer/cache
8-
9-
## PHP versions we test against
10-
php:
11-
- 7.2
12-
- 7.3
13-
- nightly
14-
15-
## Environment variables
16-
env:
17-
- coverage=true
6+
- $HOME/.composer/cache/files
187

198
## Build matrix for lowest and highest possible targets
209
matrix:
2110
include:
11+
- php: 7.2
12+
env:
13+
- qaExtended=true
14+
- dropPlatform=false
15+
- php: 7.3
16+
env:
17+
- dropPlatform=false
18+
- php: nightly
19+
env:
20+
- dropPlatform=false
2221
- php: 7.2
2322
env:
2423
- dependencies=lowest
25-
- coverage=false
24+
- dropPlatform=false
2625
- php: 7.3
2726
env:
2827
- dependencies=lowest
29-
- coverage=false
28+
- dropPlatform=false
3029
- php: nightly
3130
env:
3231
- dependencies=lowest
33-
- coverage=false
32+
- dropPlatform=false
3433
- php: 7.2
3534
env:
3635
- dependencies=highest
37-
- coverage=false
36+
- dropPlatform=false
3837
- php: 7.3
3938
env:
4039
- dependencies=highest
41-
- coverage=false
40+
- dropPlatform=false
4241
- php: nightly
4342
env:
4443
- dependencies=highest
45-
- coverage=false
44+
- dropPlatform=false
4645

4746
## Install or update dependencies
4847
install:
4948
- composer validate
50-
- if [ "$coverage" = "false" ]; then phpenv config-rm xdebug.ini || :; fi;
49+
- if [ -z "$dropPlatform" ]; then composer config --unset platform.php; fi;
50+
- if [ -z "$qaExtended" ]; then phpenv config-rm xdebug.ini || :; fi;
5151
- if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
5252
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
5353
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
5454
- composer show
5555

5656
## Run the actual test
5757
script:
58-
- if [ "$coverage" = "false" ]; then make ci; fi;
59-
- if [ "$coverage" = "true" ]; then make ci-with-coverage; fi;
58+
- if [ -z "$qaExtended" ]; then make ci; fi;
59+
- if [ "$qaExtended" = "true" ]; then make ci-extended; fi;
6060

6161
## Gather coverage and set it to coverage servers
62-
after_script: make ci-coverage
62+
after_script: if [ "$qaExtended" = "true" ]; then make ci-coverage; fi;

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ all-coverage:
77
ci:
88
composer run-script qa-ci --timeout=0
99

10-
ci-with-coverage:
11-
composer run-script qa-ci-coverage --timeout=0
10+
ci-extended:
11+
composer run-script qa-ci-extended --timeout=0
1212

1313
contrib:
1414
composer run-script qa-contrib --timeout=0
@@ -19,8 +19,8 @@ init:
1919
cs:
2020
composer cs
2121

22-
benchmark:
23-
composer benchmark
22+
cs-fix:
23+
composer cs-fix
2424

2525
unit:
2626
composer run-script unit --timeout=0

composer.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"psr/http-message": "^1.0"
1717
},
1818
"require-dev": {
19-
"api-clients/test-utilities": "^3.0.1",
19+
"api-clients/test-utilities": "^3.0.1 || ^5.0.0",
2020
"ringcentral/psr7": "^1.2"
2121
},
2222
"autoload": {
@@ -39,7 +39,11 @@
3939
"ensure-installed": "composer install --ansi -n -q",
4040
"cs": [
4141
"@ensure-installed",
42-
"phpcs --standard=PSR2 src/"
42+
"php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
43+
],
44+
"cs-fix": [
45+
"@ensure-installed",
46+
"php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
4347
],
4448
"unit": [
4549
"@ensure-installed",
@@ -53,10 +57,6 @@
5357
"@ensure-installed",
5458
"parallel-lint --exclude vendor ."
5559
],
56-
"benchmark": [
57-
"@ensure-installed",
58-
"php examples/benchmark.php"
59-
],
6060
"qa-all": [
6161
"@lint-php",
6262
"@cs",
@@ -73,16 +73,13 @@
7373
"@unit"
7474
],
7575
"qa-ci": [
76-
"@qa-all",
77-
"@benchmark"
76+
"@unit"
7877
],
79-
"qa-ci-coverage": [
80-
"@qa-all-coverage",
81-
"@benchmark"
78+
"qa-ci-extended": [
79+
"@qa-all-coverage"
8280
],
8381
"qa-ci-windows": [
84-
"@qa-windows",
85-
"@benchmark"
82+
"@qa-windows"
8683
],
8784
"qa-contrib": [
8885
"@qa-all"

0 commit comments

Comments
 (0)