From e9044ed5d9a88b7c7293b01670297155cd8c3903 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Fri, 3 Mar 2017 16:03:07 -0600 Subject: [PATCH 1/9] Added PHP 7 to travis tests --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70a6fed..f6490af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 + - 7.1 - hhvm - hhvm-nightly From d9f7efe9eaec1193264e034292a2b59d32b2f630 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Fri, 3 Mar 2017 16:08:48 -0600 Subject: [PATCH 2/9] Fixed dependency to v1.0.x --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 148b173..68ed572 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=5.3.0" }, "require-dev": { - "satooshi/php-coveralls": "dev-master" + "satooshi/php-coveralls": "1.0.*" }, "autoload": { "psr-4": {"joshtronic\\": "src/"} From 669692cc7afa678e5dc739cfc93fda4c8807b30b Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 17:13:45 -0500 Subject: [PATCH 3/9] Getting CI tightened up again --- .travis.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index f6490af..11ab0f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,16 @@ language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - hhvm - - hhvm-nightly +dist: trusty +sudo: required matrix: - allow_failures: - - php: hhvm-nightly + include: + - php: 5.3 + dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 install: - composer install @@ -22,7 +20,8 @@ before_script: - cd tests script: - - phpunit --colors --coverage-clover /home/travis/build/joshtronic/php-googleplaces/build/logs/clover.xml . + - phpunit --colors --coverage-clover ../build/logs/clover.xml . after_success: - - php ../vendor/bin/coveralls --config ../.coveralls.yml -v + - cd .. + - php vendor/bin/coveralls --config .coveralls.yml -v From e7a14879ae98b84e67392e92ab75d753a6deeba7 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 17:26:42 -0500 Subject: [PATCH 4/9] Updated badges --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9e2a217..c95972d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,8 @@ # php-googleplaces -[![Build Status](http://img.shields.io/travis/joshtronic/php-googleplaces.svg?style=flat)][travis] -[![Coverage Status](http://img.shields.io/coveralls/joshtronic/php-googleplaces.svg?style=flat)][coveralls] -[![Downloads](http://img.shields.io/packagist/dm/joshtronic/php-googleplaces.svg?style=flat)][packagist] -[![Gittip](http://img.shields.io/gittip/joshtronic.svg?style=flat)][gittip] - -[travis]: http://travis-ci.org/joshtronic/php-googleplaces -[coveralls]: https://coveralls.io/r/joshtronic/php-googleplaces -[packagist]: https://packagist.org/packages/joshtronic/php-googleplaces -[gittip]: https://www.gittip.com/joshtronic/ +[![Build Status](https://travis-ci.org/joshtronic/php-googleplaces.svg?branch=master)](https://travis-ci.org/joshtronic/php-googleplaces) +[![Coverage Status](https://coveralls.io/repos/github/joshtronic/php-googleplaces/badge.svg?branch=master)](https://coveralls.io/github/joshtronic/php-googleplaces?branch=master) +[![Total Downloads](https://poser.pugx.org/joshtronic/php-googleplaces/downloads)](https://packagist.org/packages/joshtronic/php-googleplaces) PHP Wrapper for the Google Places API. From 4f7846d20d68a5eccd2e14e7d28f5a6c369f643e Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 17:27:13 -0500 Subject: [PATCH 5/9] Add polyfill for unit tests --- tests/GooglePlacesTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/GooglePlacesTest.php b/tests/GooglePlacesTest.php index 2d0b401..13dcdf8 100644 --- a/tests/GooglePlacesTest.php +++ b/tests/GooglePlacesTest.php @@ -3,6 +3,10 @@ require_once '../src/GooglePlaces.php'; require_once '../src/GooglePlacesClient.php'; +if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { + class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); +} + class GooglePlacesTest extends PHPUnit_Framework_TestCase { private $places; From efe5d360d9297ade6375c1f1113c9b31eea22de4 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 18:26:41 -0500 Subject: [PATCH 6/9] Updating deprecated method call --- tests/GooglePlacesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GooglePlacesTest.php b/tests/GooglePlacesTest.php index 13dcdf8..95b5808 100644 --- a/tests/GooglePlacesTest.php +++ b/tests/GooglePlacesTest.php @@ -19,7 +19,7 @@ class GooglePlacesTest extends PHPUnit_Framework_TestCase private function clientSetUp($next = false) { - $client = $this->getMock('GooglePlacesClient', array('get')); + $client = $this->getMockBuilder('GooglePlacesClient', array('get')); $client ->expects($this->once()) From 09df808c96dd6f9bf316466a039b851be7b7c89a Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 18:35:24 -0500 Subject: [PATCH 7/9] Git ignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..987e2a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor From 33b799f5765ba66eaf85fc99b0283c590eb41b07 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 18:36:47 -0500 Subject: [PATCH 8/9] Maybe this --- tests/GooglePlacesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GooglePlacesTest.php b/tests/GooglePlacesTest.php index 95b5808..f0a6760 100644 --- a/tests/GooglePlacesTest.php +++ b/tests/GooglePlacesTest.php @@ -19,7 +19,7 @@ class GooglePlacesTest extends PHPUnit_Framework_TestCase private function clientSetUp($next = false) { - $client = $this->getMockBuilder('GooglePlacesClient', array('get')); + $client = $this->createMock('GooglePlacesClient', array('get')); $client ->expects($this->once()) From b66d342eb677a54ccd75bb9061bda305875fc9d3 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 28 May 2017 18:43:04 -0500 Subject: [PATCH 9/9] Getting hacky --- tests/GooglePlacesTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/GooglePlacesTest.php b/tests/GooglePlacesTest.php index f0a6760..241aeea 100644 --- a/tests/GooglePlacesTest.php +++ b/tests/GooglePlacesTest.php @@ -19,7 +19,11 @@ class GooglePlacesTest extends PHPUnit_Framework_TestCase private function clientSetUp($next = false) { - $client = $this->createMock('GooglePlacesClient', array('get')); + if (version_compare(PHPUnit_Runner_Version::id(), '5.4', '<=')) { + $client = $this->getMock('GooglePlacesClient', array('get')); + } else { + $client = $this->createMock('GooglePlacesClient'); + } $client ->expects($this->once())