diff --git a/.travis.yml b/.travis.yml index cc6f7c6..6b4b2c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: php php: - - 7.0 - - 7.1 - 7.2 - 7.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index f138cc0..4abcc4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `geocoder` will be documented in this file. +## 3.5.0 - 2019-05-31 + +- add country parameter +- drop support for PHP 7.1 and smaller + ## 3.4.0 - 2018-01-24 - include address components in the response diff --git a/README.md b/README.md index 4ea3f82..2eb83bf 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ return [ 'bounds' => '', /* - * The country param used to limit results to a specific Country by its code + * The country param used to limit results to a specific country. * * More info: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests */ diff --git a/composer.json b/composer.json index 0a37982..2b77022 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=7.0", + "php": "^7.2", "illuminate/support": "^5.0", "guzzlehttp/guzzle": "~6.0" }, "require-dev": { - "phpunit/phpunit": "^6.4", - "vlucas/phpdotenv": "^2.4" + "phpunit/phpunit": "^8.0", + "vlucas/phpdotenv": "^3.0" }, "autoload": { "psr-4": { diff --git a/config/geocoder.php b/config/geocoder.php index c313058..d70edc7 100644 --- a/config/geocoder.php +++ b/config/geocoder.php @@ -30,7 +30,7 @@ 'bounds' => '', /* - * The country param used to limit results to a specific Country by its code + * The country param used to limit results to a specific country. * * More info: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests */ diff --git a/src/Geocoder.php b/src/Geocoder.php index ac37a61..54d7e9a 100644 --- a/src/Geocoder.php +++ b/src/Geocoder.php @@ -145,7 +145,10 @@ protected function getRequestPayload(array $parameters): array ], $parameters); if ($this->country) { - $parameters = array_merge($parameters, ['components' => 'country:'.$this->country]); + $parameters = array_merge( + $parameters, + ['components' => 'country:'.$this->country] + ); } return ['query' => $parameters]; diff --git a/tests/GeocoderTest.php b/tests/GeocoderTest.php index 973ea36..d35833c 100644 --- a/tests/GeocoderTest.php +++ b/tests/GeocoderTest.php @@ -10,7 +10,7 @@ class GeocoderTest extends TestCase /** @var \Spatie\Geocoder\Geocoder */ protected $geocoder; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 538a647..fe573d9 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,7 +7,7 @@ class TestCase extends PHPUnitTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp();