diff --git a/composer.json b/composer.json index adb807f49..d4e745db0 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ "homepage": "http://geocoder-php.org", "require": { "php": ">=8.2", - "igorw/get-in": "^1.0", "php-http/discovery": "^1.17", "php-http/promise": "^1.0", "psr/http-client-implementation": "^1.0", @@ -41,7 +40,7 @@ "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^9.6.11", "symfony/http-client": "^5.4.45 || ^6.4 || ^7.0", "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, diff --git a/phpstan.neon b/phpstan.neon index d3965c3df..4a84f529a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,4 +7,3 @@ parameters: excludePaths: - **/vendor/** treatPhpDocTypesAsCertain: false - checkGenericClassInNonGenericObjectType: false diff --git a/src/Common/Tests/TimedGeocoderTest.php b/src/Common/Tests/TimedGeocoderTest.php index ca8b130bc..4a735a087 100644 --- a/src/Common/Tests/TimedGeocoderTest.php +++ b/src/Common/Tests/TimedGeocoderTest.php @@ -47,7 +47,7 @@ public function testGeocode(): void { $this->delegate->expects($this->once()) ->method('geocodeQuery') - ->will($this->returnValue(new AddressCollection([]))); + ->willReturn(new AddressCollection([])); $this->geocoder->geocode('foo'); @@ -74,7 +74,7 @@ public function testReverse(): void { $this->delegate->expects($this->once()) ->method('reverseQuery') - ->will($this->returnValue(new AddressCollection([]))); + ->willReturn(new AddressCollection([])); $this->geocoder->reverse(0, 0); diff --git a/src/Common/composer.json b/src/Common/composer.json index 122e72eca..d67a506ce 100644 --- a/src/Common/composer.json +++ b/src/Common/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "nyholm/nsa": "^1.1", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6.11", "symfony/stopwatch": "~2.5 || ~5.0 || ~7.0" }, "suggest": { diff --git a/src/Http/composer.json b/src/Http/composer.json index 982d3834c..604b963fa 100644 --- a/src/Http/composer.json +++ b/src/Http/composer.json @@ -24,7 +24,7 @@ "nyholm/psr7": "^1.0", "php-http/message": "^1.0", "php-http/mock-client": "^1.0", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6.11", "symfony/stopwatch": "~2.5 || ~5.0" }, "extra": { diff --git a/src/Plugin/Tests/Plugin/CachePluginTest.php b/src/Plugin/Tests/Plugin/CachePluginTest.php index 6f72c2db0..2eb6c951d 100644 --- a/src/Plugin/Tests/Plugin/CachePluginTest.php +++ b/src/Plugin/Tests/Plugin/CachePluginTest.php @@ -27,10 +27,7 @@ public function testPluginMiss(): void $ttl = 4711; $query = GeocodeQuery::create('foo'); $queryString = sha1($query->__toString()); - $cache = $this->getMockBuilder(VoidCachePool::class) - ->disableOriginalConstructor() - ->setMethods(['get', 'set']) - ->getMock(); + $cache = $this->createPartialMock(VoidCachePool::class, ['get', 'set']); $cache->expects($this->once()) ->method('get') @@ -69,10 +66,7 @@ public function getQueryProvider(): \Generator */ public function testPluginHit(Query $query, string $key): void { - $cache = $this->getMockBuilder(VoidCachePool::class) - ->disableOriginalConstructor() - ->setMethods(['get', 'set']) - ->getMock(); + $cache = $this->createPartialMock(VoidCachePool::class, ['get', 'set']); $cache->expects($this->once()) ->method('get') diff --git a/src/Plugin/Tests/Plugin/LoggerPluginTest.php b/src/Plugin/Tests/Plugin/LoggerPluginTest.php index 89e78405b..7026bae53 100644 --- a/src/Plugin/Tests/Plugin/LoggerPluginTest.php +++ b/src/Plugin/Tests/Plugin/LoggerPluginTest.php @@ -25,10 +25,7 @@ class LoggerPluginTest extends TestCase { public function testPlugin(): void { - $logger = $this->getMockBuilder(AbstractLogger::class) - ->disableOriginalConstructor() - ->setMethods(['log']) - ->getMock(); + $logger = $this->createPartialMock(AbstractLogger::class, ['log']); $logger->expects($this->once()) ->method('log') ->with('info', $this->callback(function ($message) { @@ -38,10 +35,7 @@ public function testPlugin(): void $geocodeQuery = GeocodeQuery::create('foo'); $collection = new AddressCollection([]); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->once()) ->method('geocodeQuery') ->with($geocodeQuery) @@ -56,10 +50,7 @@ public function testPlugin(): void public function testPluginException(): void { $this->expectException(QuotaExceeded::class); - $logger = $this->getMockBuilder(AbstractLogger::class) - ->disableOriginalConstructor() - ->setMethods(['log']) - ->getMock(); + $logger = $this->createPartialMock(AbstractLogger::class, ['log']); $logger->expects($this->once()) ->method('log') ->with('error', $this->callback(function ($message) { @@ -67,10 +58,7 @@ public function testPluginException(): void })); $geocodeQuery = GeocodeQuery::create('foo'); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->once()) ->method('geocodeQuery') ->willThrowException(new QuotaExceeded()); diff --git a/src/Plugin/Tests/PluginProviderTest.php b/src/Plugin/Tests/PluginProviderTest.php index 5df6bcd77..a662f0464 100644 --- a/src/Plugin/Tests/PluginProviderTest.php +++ b/src/Plugin/Tests/PluginProviderTest.php @@ -30,10 +30,7 @@ public function testDispatchQueries(): void $reverseQuery = ReverseQuery::fromCoordinates(47, 11); $collection = new AddressCollection([]); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->once()) ->method('geocodeQuery') ->with($geocodeQuery) @@ -54,10 +51,7 @@ public function testPluginsIsBeingUsedWhenGeocoding(): void $geocodeQuery = GeocodeQuery::create('foo'); $collection = new AddressCollection([]); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->once()) ->method('geocodeQuery') ->with($geocodeQuery) @@ -65,10 +59,7 @@ public function testPluginsIsBeingUsedWhenGeocoding(): void $provider->expects($this->never())->method('reverseQuery'); $provider->expects($this->never())->method('getName'); - $pluginA = $this->getMockBuilder(Plugin::class) - ->disableOriginalConstructor() - ->setMethods(['handleQuery']) - ->getMock(); + $pluginA = $this->createPartialMock(Plugin::class, ['handleQuery']); $pluginA->expects($this->once()) ->method('handleQuery') ->with($geocodeQuery, $this->isType('callable'), $this->isType('callable')) @@ -85,10 +76,7 @@ public function testPluginsIsBeingUsedWhenReverse(): void $reverseQuery = ReverseQuery::fromCoordinates(47, 11); $collection = new AddressCollection([]); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->never())->method('geocodeQuery'); $provider->expects($this->never())->method('getName'); $provider->expects($this->once()) @@ -96,10 +84,7 @@ public function testPluginsIsBeingUsedWhenReverse(): void ->with($reverseQuery) ->willReturn($collection); - $pluginA = $this->getMockBuilder(Plugin::class) - ->disableOriginalConstructor() - ->setMethods(['handleQuery']) - ->getMock(); + $pluginA = $this->createPartialMock(Plugin::class, ['handleQuery']); $pluginA->expects($this->once()) ->method('handleQuery') ->with($reverseQuery, $this->isType('callable'), $this->isType('callable')) @@ -116,28 +101,19 @@ public function testLoopException(): void $this->expectException(LoopException::class); $geocodeQuery = GeocodeQuery::create('foo'); - $provider = $this->getMockBuilder(Provider::class) - ->disableOriginalConstructor() - ->setMethods(['geocodeQuery', 'reverseQuery', 'getName']) - ->getMock(); + $provider = $this->createPartialMock(Provider::class, ['geocodeQuery', 'reverseQuery', 'getName']); $provider->expects($this->never())->method('geocodeQuery'); $provider->expects($this->never())->method('reverseQuery'); $provider->expects($this->never())->method('getName'); - $pluginA = $this->getMockBuilder(Plugin::class) - ->disableOriginalConstructor() - ->setMethods(['handleQuery']) - ->getMock(); + $pluginA = $this->createPartialMock(Plugin::class, ['handleQuery']); $pluginA->expects($this->any()) ->method('handleQuery') ->with($geocodeQuery, $this->isType('callable'), $this->isType('callable')) ->willReturnCallback(function (Query $query, callable $next, callable $first) { return $next($query); }); - $pluginB = $this->getMockBuilder(Plugin::class) - ->disableOriginalConstructor() - ->setMethods(['handleQuery']) - ->getMock(); + $pluginB = $this->createPartialMock(Plugin::class, ['handleQuery']); $pluginB->expects($this->any()) ->method('handleQuery') ->with($geocodeQuery, $this->isType('callable'), $this->isType('callable')) diff --git a/src/Plugin/composer.json b/src/Plugin/composer.json index 70910b2e2..0958f3981 100644 --- a/src/Plugin/composer.json +++ b/src/Plugin/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "cache/void-adapter": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/AlgoliaPlaces/composer.json b/src/Provider/AlgoliaPlaces/composer.json index a1bd01e7a..f0d2d573a 100644 --- a/src/Provider/AlgoliaPlaces/composer.json +++ b/src/Provider/AlgoliaPlaces/composer.json @@ -23,7 +23,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/ArcGISOnline/composer.json b/src/Provider/ArcGISOnline/composer.json index fce26fea7..83f038589 100644 --- a/src/Provider/ArcGISOnline/composer.json +++ b/src/Provider/ArcGISOnline/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/AzureMaps/composer.json b/src/Provider/AzureMaps/composer.json index 9e00d0917..22d9f5cf7 100644 --- a/src/Provider/AzureMaps/composer.json +++ b/src/Provider/AzureMaps/composer.json @@ -21,7 +21,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/BingMaps/composer.json b/src/Provider/BingMaps/composer.json index 6e9da4695..b568f7690 100644 --- a/src/Provider/BingMaps/composer.json +++ b/src/Provider/BingMaps/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Cache/Tests/ProviderCacheTest.php b/src/Provider/Cache/Tests/ProviderCacheTest.php index 47b95b02c..df179a0e9 100644 --- a/src/Provider/Cache/Tests/ProviderCacheTest.php +++ b/src/Provider/Cache/Tests/ProviderCacheTest.php @@ -41,14 +41,9 @@ protected function setUp(): void { parent::setUp(); - $this->cacheMock = $this->getMockBuilder(CacheInterface::class) - ->setMethods(['get', 'set', 'delete', 'clear', 'setMultiple', 'getMultiple', 'deleteMultiple', 'has']) + $this->cacheMock = $this->createPartialMock(CacheInterface::class, ['get', 'set', 'delete', 'clear', 'setMultiple', 'getMultiple', 'deleteMultiple', 'has']); - ->getMock(); - - $this->providerMock = $this->getMockBuilder(Provider::class) - ->setMethods(['getFoo', 'getName', 'geocodeQuery', 'reverseQuery']) - ->getMock(); + $this->providerMock = $this->createPartialMock(Provider::class, ['getName', 'geocodeQuery', 'reverseQuery']); } public function testName(): void diff --git a/src/Provider/Cache/composer.json b/src/Provider/Cache/composer.json index 8d025a08c..ad1331a4d 100644 --- a/src/Provider/Cache/composer.json +++ b/src/Provider/Cache/composer.json @@ -20,7 +20,7 @@ "geocoder-php/provider-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Chain/Tests/ChainTest.php b/src/Provider/Chain/Tests/ChainTest.php index eaf5f4773..997ace522 100644 --- a/src/Provider/Chain/Tests/ChainTest.php +++ b/src/Provider/Chain/Tests/ChainTest.php @@ -45,15 +45,15 @@ public function testReverse(): void $mockOne = $this->getMockBuilder(Provider::class)->getMock(); $mockOne->expects($this->once()) ->method('reverseQuery') - ->will($this->returnCallback(function () { + ->willReturnCallback(function () { throw new \Exception(); - })); + }); $mockTwo = $this->getMockBuilder(Provider::class)->getMock(); $result = new AddressCollection(['foo' => 'bar']); $mockTwo->expects($this->once()) ->method('reverseQuery') - ->will($this->returnValue($result)); + ->willReturn($result); $chain = new Chain([$mockOne, $mockTwo]); @@ -66,16 +66,16 @@ public function testGeocode(): void $mockOne = $this->getMockBuilder(Provider::class)->getMock(); $mockOne->expects($this->once()) ->method('geocodeQuery') - ->will($this->returnCallback(function () { + ->willReturnCallback(function () { throw new \Exception(); - })); + }); $mockTwo = $this->getMockBuilder(Provider::class)->getMock(); $result = new AddressCollection(['foo' => 'bar']); $mockTwo->expects($this->once()) ->method('geocodeQuery') ->with($query) - ->will($this->returnValue($result)); + ->willReturn($result); $chain = new Chain([$mockOne, $mockTwo]); diff --git a/src/Provider/Chain/composer.json b/src/Provider/Chain/composer.json index b3fdb9ce6..5937fe948 100644 --- a/src/Provider/Chain/composer.json +++ b/src/Provider/Chain/composer.json @@ -23,7 +23,7 @@ "nyholm/nsa": "^1.1", "php-http/curl-client": "^2.2", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/FreeGeoIp/composer.json b/src/Provider/FreeGeoIp/composer.json index 70d58d870..032acd1de 100644 --- a/src/Provider/FreeGeoIp/composer.json +++ b/src/Provider/FreeGeoIp/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GeoIP2/Tests/GeoIP2AdapterTest.php b/src/Provider/GeoIP2/Tests/GeoIP2AdapterTest.php index d052ac89c..7f47ac3af 100644 --- a/src/Provider/GeoIP2/Tests/GeoIP2AdapterTest.php +++ b/src/Provider/GeoIP2/Tests/GeoIP2AdapterTest.php @@ -86,9 +86,7 @@ public function testIpAddressIsPassedCorrectToReader(string $geoIp2Model): void ->expects($this->once()) ->method($geoIp2Model) ->with('127.0.0.1') - ->will($this->returnValue( - $this->getGeoIP2ModelMock($geoIp2Model) - )); + ->willReturn($this->getGeoIP2ModelMock($geoIp2Model)); $adapter = new GeoIP2Adapter($geoIp2Provider, $geoIp2Model); $adapter->getContent('file://geoip?127.0.0.1'); @@ -110,7 +108,7 @@ public function testReaderResponseIsJsonEncoded(): void $geoIp2Provider ->expects($this->any()) ->method('city') - ->will($this->returnValue($cityModel)); + ->willReturn($cityModel); $adapter = new GeoIP2Adapter($geoIp2Provider); @@ -118,7 +116,7 @@ public function testReaderResponseIsJsonEncoded(): void $this->assertJson($result); $decodedResult = json_decode($result); - $this->assertObjectHasAttribute('city', $decodedResult); + $this->assertObjectHasProperty('city', $decodedResult); } /** @@ -145,23 +143,21 @@ protected function getGeoIP2ModelMock($geoIP2Model) $mock ->expects($this->any()) ->method('jsonSerialize') - ->will($this->returnValue( - [ - 'city' => [ - 'geoname_id' => 2911298, - 'names' => [ - 'de' => 'Hamburg', - 'en' => 'Hamburg', - 'es' => 'Hamburgo', - 'fr' => 'Hambourg', - 'ja' => 'ハンブルク', - 'pt-BR' => 'Hamburgo', - 'ru' => 'Гамбург', - 'zh-CN' => '汉堡市', - ], + ->willReturn([ + 'city' => [ + 'geoname_id' => 2911298, + 'names' => [ + 'de' => 'Hamburg', + 'en' => 'Hamburg', + 'es' => 'Hamburgo', + 'fr' => 'Hambourg', + 'ja' => 'ハンブルク', + 'pt-BR' => 'Hamburgo', + 'ru' => 'Гамбург', + 'zh-CN' => '汉堡市', ], - ] - )); + ], + ]); return $mock; } diff --git a/src/Provider/GeoIP2/Tests/GeoIP2Test.php b/src/Provider/GeoIP2/Tests/GeoIP2Test.php index bc0885452..050188d8f 100644 --- a/src/Provider/GeoIP2/Tests/GeoIP2Test.php +++ b/src/Provider/GeoIP2/Tests/GeoIP2Test.php @@ -264,10 +264,7 @@ public static function provideDataForTestingExceptions(): array */ private function getGeoIP2AdapterMock($returnValue = '') { - $mock = $this->getMockBuilder(GeoIP2Adapter::class) - ->disableOriginalConstructor() - ->setMethods(['getContent']) - ->getMock(); + $mock = $this->createPartialMock(GeoIP2Adapter::class, ['getContent']); if ($returnValue instanceof \Exception) { $returnValue = $this->throwException($returnValue); diff --git a/src/Provider/GeoIP2/composer.json b/src/Provider/GeoIP2/composer.json index 57770f775..8bcf27a9c 100644 --- a/src/Provider/GeoIP2/composer.json +++ b/src/Provider/GeoIP2/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GeoIPs/composer.json b/src/Provider/GeoIPs/composer.json index 7eac6dcb3..ad011684a 100644 --- a/src/Provider/GeoIPs/composer.json +++ b/src/Provider/GeoIPs/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GeoPlugin/GeoPlugin.php b/src/Provider/GeoPlugin/GeoPlugin.php index 69a52bf77..0cb0152f1 100644 --- a/src/Provider/GeoPlugin/GeoPlugin.php +++ b/src/Provider/GeoPlugin/GeoPlugin.php @@ -86,8 +86,8 @@ private function executeQuery(string $url): AddressCollection $adminLevels = []; - $region = \igorw\get_in($data, ['geoplugin_regionName']); - $regionCode = \igorw\get_in($data, ['geoplugin_regionCode']); + $region = $data['geoplugin_regionName'] ?? null; + $regionCode = $data['geoplugin_regionCode'] ?? null; if (null !== $region || null !== $regionCode) { $adminLevels[] = ['name' => $region, 'code' => $regionCode, 'level' => 1]; diff --git a/src/Provider/GeoPlugin/composer.json b/src/Provider/GeoPlugin/composer.json index 64af30cd1..d256c9bf6 100644 --- a/src/Provider/GeoPlugin/composer.json +++ b/src/Provider/GeoPlugin/composer.json @@ -14,7 +14,6 @@ "require": { "php": "^8.0", "geocoder-php/common-http": "^4.0", - "igorw/get-in": "^1.0", "willdurand/geocoder": "^4.0|^5.0" }, "provide": { @@ -23,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GeocodeEarth/composer.json b/src/Provider/GeocodeEarth/composer.json index 37900c92a..e5ad51187 100644 --- a/src/Provider/GeocodeEarth/composer.json +++ b/src/Provider/GeocodeEarth/composer.json @@ -23,7 +23,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Geoip/composer.json b/src/Provider/Geoip/composer.json index bcc7dde42..0a5b855ab 100644 --- a/src/Provider/Geoip/composer.json +++ b/src/Provider/Geoip/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Geonames/composer.json b/src/Provider/Geonames/composer.json index 4b0f1615e..6a3ee559e 100644 --- a/src/Provider/Geonames/composer.json +++ b/src/Provider/Geonames/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GoogleMaps/composer.json b/src/Provider/GoogleMaps/composer.json index 2908c2eee..a306f1063 100644 --- a/src/Provider/GoogleMaps/composer.json +++ b/src/Provider/GoogleMaps/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GoogleMapsPlaces/composer.json b/src/Provider/GoogleMapsPlaces/composer.json index df354b631..d62c49662 100644 --- a/src/Provider/GoogleMapsPlaces/composer.json +++ b/src/Provider/GoogleMapsPlaces/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/GraphHopper/composer.json b/src/Provider/GraphHopper/composer.json index 64cd45c38..ef0d1c6cb 100644 --- a/src/Provider/GraphHopper/composer.json +++ b/src/Provider/GraphHopper/composer.json @@ -16,7 +16,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Here/composer.json b/src/Provider/Here/composer.json index ef89ab88e..12b36e365 100644 --- a/src/Provider/Here/composer.json +++ b/src/Provider/Here/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/HostIp/composer.json b/src/Provider/HostIp/composer.json index 18b3cc636..1eedb877e 100644 --- a/src/Provider/HostIp/composer.json +++ b/src/Provider/HostIp/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/IP2Location/composer.json b/src/Provider/IP2Location/composer.json index fe21fe03d..d03eca5a5 100644 --- a/src/Provider/IP2Location/composer.json +++ b/src/Provider/IP2Location/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/IP2LocationBinary/composer.json b/src/Provider/IP2LocationBinary/composer.json index 0b889e488..8cbb92202 100644 --- a/src/Provider/IP2LocationBinary/composer.json +++ b/src/Provider/IP2LocationBinary/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/IpInfo/composer.json b/src/Provider/IpInfo/composer.json index 0f2171641..42862ad0d 100644 --- a/src/Provider/IpInfo/composer.json +++ b/src/Provider/IpInfo/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/IpInfoDb/composer.json b/src/Provider/IpInfoDb/composer.json index dc16fbd77..dc448adde 100644 --- a/src/Provider/IpInfoDb/composer.json +++ b/src/Provider/IpInfoDb/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Ipstack/composer.json b/src/Provider/Ipstack/composer.json index 3946aa492..7fe6da0a1 100644 --- a/src/Provider/Ipstack/composer.json +++ b/src/Provider/Ipstack/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/LocationIQ/composer.json b/src/Provider/LocationIQ/composer.json index af4b6d52d..ec81d6ba3 100644 --- a/src/Provider/LocationIQ/composer.json +++ b/src/Provider/LocationIQ/composer.json @@ -24,7 +24,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "provide": { "geocoder-php/provider-implementation": "1.0" diff --git a/src/Provider/MapQuest/composer.json b/src/Provider/MapQuest/composer.json index 3d7e9d964..ac19ea41d 100644 --- a/src/Provider/MapQuest/composer.json +++ b/src/Provider/MapQuest/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/MapTiler/composer.json b/src/Provider/MapTiler/composer.json index f05322d75..34c1f7730 100644 --- a/src/Provider/MapTiler/composer.json +++ b/src/Provider/MapTiler/composer.json @@ -21,7 +21,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "autoload": { "psr-4": { diff --git a/src/Provider/Mapbox/composer.json b/src/Provider/Mapbox/composer.json index c88d0d47c..3ec5dd196 100644 --- a/src/Provider/Mapbox/composer.json +++ b/src/Provider/Mapbox/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Mapzen/composer.json b/src/Provider/Mapzen/composer.json index b67b7c2e9..7bd407e90 100644 --- a/src/Provider/Mapzen/composer.json +++ b/src/Provider/Mapzen/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/MaxMind/MaxMind.php b/src/Provider/MaxMind/MaxMind.php index 0511b2612..25bc1c7d9 100644 --- a/src/Provider/MaxMind/MaxMind.php +++ b/src/Provider/MaxMind/MaxMind.php @@ -146,8 +146,8 @@ private function replaceAdmins(array $data): array { $adminLevels = []; - $region = \igorw\get_in($data, ['region']); - $regionCode = \igorw\get_in($data, ['regionCode']); + $region = $data['region'] ?? null; + $regionCode = $data['regionCode'] ?? null; unset($data['region'], $data['regionCode']); if (null !== $region || null !== $regionCode) { diff --git a/src/Provider/MaxMind/composer.json b/src/Provider/MaxMind/composer.json index 3551c1934..42185324f 100644 --- a/src/Provider/MaxMind/composer.json +++ b/src/Provider/MaxMind/composer.json @@ -13,7 +13,6 @@ ], "require": { "php": "^8.0", - "igorw/get-in": "^1.0", "willdurand/geocoder": "^4.1|^5.0" }, "provide": { @@ -23,7 +22,7 @@ "geocoder-php/common-http": "^4.0", "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/MaxMindBinary/composer.json b/src/Provider/MaxMindBinary/composer.json index 6b9adb2ae..b696b2ccf 100644 --- a/src/Provider/MaxMindBinary/composer.json +++ b/src/Provider/MaxMindBinary/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Nominatim/composer.json b/src/Provider/Nominatim/composer.json index 97fa34eeb..bfa150967 100644 --- a/src/Provider/Nominatim/composer.json +++ b/src/Provider/Nominatim/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/OpenCage/composer.json b/src/Provider/OpenCage/composer.json index 752870d3d..91033445c 100644 --- a/src/Provider/OpenCage/composer.json +++ b/src/Provider/OpenCage/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/OpenRouteService/composer.json b/src/Provider/OpenRouteService/composer.json index 947fd0d53..db71a816d 100644 --- a/src/Provider/OpenRouteService/composer.json +++ b/src/Provider/OpenRouteService/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Pelias/composer.json b/src/Provider/Pelias/composer.json index aea3c6971..60c1c541e 100644 --- a/src/Provider/Pelias/composer.json +++ b/src/Provider/Pelias/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.7", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Photon/composer.json b/src/Provider/Photon/composer.json index dcde5415e..390fafee7 100644 --- a/src/Provider/Photon/composer.json +++ b/src/Provider/Photon/composer.json @@ -21,7 +21,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "autoload": { "psr-4": { diff --git a/src/Provider/PickPoint/composer.json b/src/Provider/PickPoint/composer.json index 7328cfb9b..9f346512d 100644 --- a/src/Provider/PickPoint/composer.json +++ b/src/Provider/PickPoint/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/TomTom/composer.json b/src/Provider/TomTom/composer.json index 138c8b4f4..64069ba4f 100644 --- a/src/Provider/TomTom/composer.json +++ b/src/Provider/TomTom/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": { diff --git a/src/Provider/Yandex/composer.json b/src/Provider/Yandex/composer.json index 17b3400f6..e1f0c3c0a 100644 --- a/src/Provider/Yandex/composer.json +++ b/src/Provider/Yandex/composer.json @@ -22,7 +22,7 @@ "require-dev": { "geocoder-php/provider-integration-tests": "^1.6.3", "php-http/message": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6.11" }, "extra": { "branch-alias": {