Skip to content

Commit f72e2ce

Browse files
authored
Merge pull request #5 from php-api-clients/feature-error-handling
Error handling
2 parents 849488a + af3dfcd commit f72e2ce

13 files changed

+235
-827
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,3 @@ unit-coverage:
2727

2828
ci-coverage: init
2929
composer ci-coverage
30-
31-
mutation:
32-
composer mutation

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Currently the only provided locator is the `ContainerLocator` which accepts a
4747
return resolve($response);
4848
})->then(function (ResponseInterface $response) use ($runner) {
4949
return $runner->post($response);
50+
})->otherwise(function (Throwable $throwable) use ($runner) {
51+
return reject($runner->error($throwable));
5052
});
5153
```
5254

appveyor.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ environment:
1919
- dependencies: highest
2020
php_ver_target: 7.1
2121

22-
## Cache composer bits
22+
## Cache composer, chocolatey and php bits
2323
cache:
2424
- '%LOCALAPPDATA%\Composer\files -> composer.lock'
25+
- composer.phar
26+
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
27+
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
28+
- c:\tools\php -> .appveyor.yml
2529

2630
## Set up environment varriables
2731
init:
@@ -33,7 +37,7 @@ init:
3337
## Install PHP and composer, and run the appropriate composer command
3438
install:
3539
- IF EXIST c:\tools\php (SET PHP=0)
36-
- ps: appveyor-retry cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $Env:php_ver_target | Select-Object -first 1) -replace '[php|]','')
40+
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
3741
- cd c:\tools\php
3842
- IF %PHP%==1 copy php.ini-production php.ini /Y
3943
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
@@ -52,4 +56,4 @@ install:
5256
## Run the actual test
5357
test_script:
5458
- cd c:\projects\php-project-workspace
55-
- vendor/bin/phpunit -c phpunit.xml.dist
59+
- vendor/bin/phpunit -c phpunit.xml.dist

composer.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"react/promise": "^2.4"
1717
},
1818
"require-dev": {
19-
"api-clients/test-utilities": "^1.0",
19+
"api-clients/test-utilities": "^3.0",
2020
"container-interop/container-interop": "^1.1",
2121
"guzzlehttp/psr7": "^1.3"
2222
},
@@ -54,25 +54,19 @@
5454
"@ensure-installed",
5555
"phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml"
5656
],
57-
"mutation": [
58-
"@ensure-installed",
59-
"if [ `php -m | grep xdebug | wc -l` -gt 0 ]; then humbug --ansi --incremental; fi"
60-
],
6157
"lint-php": [
6258
"@ensure-installed",
6359
"parallel-lint --exclude vendor ."
6460
],
6561
"qa-all": [
6662
"@lint-php",
6763
"@cs",
68-
"@unit",
69-
"@mutation"
64+
"@unit"
7065
],
7166
"qa-all-coverage": [
7267
"@lint-php",
7368
"@cs",
74-
"@unit-coverage",
75-
"@mutation"
69+
"@unit-coverage"
7670
],
7771
"qa-windows": [
7872
"@lint-php",

0 commit comments

Comments
 (0)