From 52773d2de329e7f5481d7aa5986674d515de919d Mon Sep 17 00:00:00 2001 From: Robert Wittman Date: Sun, 11 Aug 2019 09:44:36 -0700 Subject: [PATCH] Fix Travis CI configuration (#33) * Fix Travis CI configuration * SUpport 5.6 and 7.*, owngrade PHPUnit * Use older autoload class name * Use vendor binary * Install composer deps * Remove php 7 syntax * Add build badge --- .travis.yml | 16 ++++++++-------- README.md | 2 ++ composer.json | 2 +- src/Service/AbstractService.php | 2 +- test/TestCase.php | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a12b804..4694da3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: php php: - - 5.5 - - 5.4 - - 7 -script: phpunit + - 5.6 + - 7.1 + - 7.2 + - 7.3 +before_script: + - composer install --prefer-source --no-interaction --dev + +script: ./vendor/bin/phpunit env: - AUTOLOAD=1 - -script: php ./build.php ${AUTOLOAD} -after_script: ./vendor/bin/coveralls -v -sudo: false diff --git a/README.md b/README.md index 130e4e6..eb182b3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/robwittman/shopify-php-sdk.svg?branch=master)](https://travis-ci.org/robwittman/shopify-php-sdk) + # Shopify PHP SDK This SDK was created to enable rapid efficient development using Shopify's API. diff --git a/composer.json b/composer.json index 214e3ca..d116104 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ ] }, "require-dev": { - "phpunit/phpunit": "^6.1", + "phpunit/phpunit": "^5.1", "squizlabs/php_codesniffer": "^3.0", "overtrue/phplint": "^0.2.4" }, diff --git a/src/Service/AbstractService.php b/src/Service/AbstractService.php index 8061e9e..6efe4e5 100644 --- a/src/Service/AbstractService.php +++ b/src/Service/AbstractService.php @@ -26,7 +26,7 @@ abstract class AbstractService const REQUEST_METHOD_PUT = 'PUT'; const REQUEST_METHOD_DELETE = 'DELETE'; - public static function factory(ApiInterface $api): AbstractService + public static function factory(ApiInterface $api) { return new static($api); } diff --git a/test/TestCase.php b/test/TestCase.php index 216d5eb..858b7be 100644 --- a/test/TestCase.php +++ b/test/TestCase.php @@ -12,7 +12,7 @@ session_start(); -class TestCase extends \PHPUnit\Framework\TestCase +class TestCase extends \PHPUnit_Framework_TestCase { public function getApi(array $params = array()) {