Skip to content

Commit

Permalink
Merge pull request #13 from vivait/feature/dependency-and-platform-up…
Browse files Browse the repository at this point in the history
…dates

Feature/dependency and platform updates
  • Loading branch information
Brunty authored Nov 13, 2018
2 parents e1e15b4 + 29f988f commit ed37cf6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
10 changes: 10 additions & 0 deletions .travis.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -x

composer self-update
composer clear-cache
composer update

if [ "$DEPENDENCIES" = 'low' ] ; then
composer update --prefer-lowest --prefer-stable
fi
34 changes: 13 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1
- 7.2
- 7.3
- nightly

cache:
directories:
- $HOME/.composer/cache

env:
matrix:
- DEPENDENCIES="high"
- DEPENDENCIES="low"

matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: 7.0

before_install:
- composer selfupdate

install:
- export COMPOSER_ROOT_VERSION=dev-master
- if [ "$DEPENDENCIES" == "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
- if [ "$DEPENDENCIES" != "low" ]; then composer update; fi;
- if [ "$DEPENDENCIES" == "low" ]; then composer update --prefer-lowest; fi;
- php: nightly

before_script:
- echo "<?php if (PHP_VERSION_ID >= 50400) echo ',@php5.4';" > php_version_tags.php
- composer selfupdate
- sh .travis.install.sh

script:
- bin/phpspec run --format=pretty
#- ./vendor/bin/phpunit --testdox
#- ./vendor/bin/behat --format=pretty --tags '~@php-version'`php php_version_tags.php`
- bin/phpspec run --format=pretty
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@
"description": "PHP client for doc.build",
"authors": [
{
"name": "Robin Cawser",
"email": "robin@vivait.co.uk"
"name": "Viva IT",
"email": "helpdesk@vivait.co.uk"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.3.3",
"php": ">=7.1",
"guzzlehttp/guzzle": "~5.0",
"symfony/options-resolver": "~2.2",
"doctrine/cache": "~1.4",
"mikey179/vfsStream": "~1.4"
"symfony/options-resolver": "^2.2|^3.4",
"doctrine/cache": "~1.4"
},
"require-dev": {
"phpspec/phpspec": "~2.0"
"mikey179/vfsStream": "^1.6",
"sebastian/comparator": "^1.2.4",
"phpspec/phpspec": "^5.1"
},
"config": {
"bin-dir": "bin"
Expand Down
2 changes: 1 addition & 1 deletion src/Vivait/DocBuild/Http/GuzzleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function post($resource, $request = [], $headers = [], $returnType = self

public function getResponseCode()
{
return $this->response->getStatusCode();
return (int) $this->response->getStatusCode();
}

public function getResponseHeaders()
Expand Down

0 comments on commit ed37cf6

Please sign in to comment.