Skip to content

Commit 80da39e

Browse files
authored
Make sure we dont include multiple vendor folders (geocoder-php#934)
* Make sure we dont include multiple vendor folders * Require discovery 1.6
1 parent c3ed5f1 commit 80da39e

File tree

33 files changed

+46
-37
lines changed

33 files changed

+46
-37
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"php-http/promise": "^1.0"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "6.3.*",
27+
"phpunit/phpunit": "^6.5 || ^7.5",
2828
"geocoder-php/provider-integration-tests": "^1.0",
2929
"geoip2/geoip2": "~2.0",
3030
"symfony/stopwatch": "~2.5",

phpunit

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
#!/usr/bin/env php
22
<?php
33

4-
if (!file_exists(__DIR__.'/vendor/phpunit/phpunit/phpunit')) {
4+
$found = false;
5+
$candidates = [\getcwd(), __DIR__];
6+
// Find a good path
7+
foreach ($candidates as $path) {
8+
if (file_exists($path.'/vendor/phpunit/phpunit/phpunit')) {
9+
require $path.'/vendor/phpunit/phpunit/phpunit';
10+
$found = true;
11+
break;
12+
}
13+
}
14+
15+
if (!$found) {
516
echo "Unable to find the `PHPUnit` script in `vendor/phpunit/phpunit/`.\nPlease run `composer update` before running this command.\n";
617
exit(1);
718
}
8-
9-
require __DIR__.'/vendor/phpunit/phpunit/phpunit';

src/Common/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"php": "^7.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "6.3.*",
18+
"phpunit/phpunit": "^6.5 || ^7.5",
1919
"symfony/stopwatch": "~2.5",
2020
"nyholm/nsa": "^1.1"
2121
},

src/Http/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"php-http/message-factory": "^1.0.2",
2020
"psr/http-message-implementation": "^1.0",
2121
"php-http/client-implementation": "^1.0",
22-
"php-http/discovery": "^1.4"
22+
"php-http/discovery": "^1.6"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "6.3.*",
25+
"phpunit/phpunit": "^6.5 || ^7.5",
2626
"symfony/stopwatch": "~2.5",
2727
"php-http/message": "^1.0",
2828
"php-http/mock-client": "^1.0",

src/Plugin/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php-http/promise": "^1.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "6.3.*",
22+
"phpunit/phpunit": "^6.5 || ^7.5",
2323
"cache/void-adapter": "^1.0"
2424
},
2525
"autoload": {

src/Provider/AlgoliaPlaces/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"willdurand/geocoder": "^4.0"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "6.3.*",
21+
"phpunit/phpunit": "^6.5 || ^7.5",
2222
"geocoder-php/provider-integration-tests": "^1.1",
2323
"php-http/message": "^1.0",
2424
"php-http/curl-client": "^1.7"

src/Provider/ArcGISOnline/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/BingMaps/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Chain/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"php-http/message": "^1.0",
2222
"php-http/curl-client": "^1.7",
2323
"nyholm/nsa": "^1.1"

src/Provider/FreeGeoIp/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/GeoIP2/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"geoip2/geoip2": "~2.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0.1"
2222
},
2323
"provide": {

src/Provider/GeoIPs/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.1"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/GeoPlugin/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"igorw/get-in": "^1.0"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "6.3.*",
21+
"phpunit/phpunit": "^6.5 || ^7.5",
2222
"geocoder-php/provider-integration-tests": "^1.0",
2323
"php-http/message": "^1.0",
2424
"php-http/curl-client": "^1.7"

src/Provider/Geoip/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0.1"
2222
},
2323
"provide": {

src/Provider/Geonames/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/GoogleMaps/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Here/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.1",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/HostIp/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/IpInfo/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/IpInfoDb/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Ipstack/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/LocationIQ/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/MapQuest/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.1",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Mapbox/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Mapzen/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/MaxMind/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"igorw/get-in": "^1.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/common-http": "^4.0",
2222
"geocoder-php/provider-integration-tests": "^1.0",
2323
"php-http/message": "^1.0",

src/Provider/MaxMindBinary/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0.1"
2222
},
2323
"provide": {

src/Provider/Nominatim/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/OpenCage/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
21-
"geocoder-php/provider-integration-tests": "^1.0",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
21+
"geocoder-php/provider-integration-tests": "^1.2",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"
2424
},

src/Provider/Photon/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"geocoder-php/provider-integration-tests": "^1.0",
2323
"php-http/curl-client": "^1.7",
2424
"php-http/message": "^1.0",
25-
"phpunit/phpunit": "6.3.*"
25+
"phpunit/phpunit": "^6.5 || ^7.5"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/Provider/PickPoint/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/TomTom/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"willdurand/geocoder": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

src/Provider/Yandex/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"geocoder-php/common-http": "^4.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "6.3.*",
20+
"phpunit/phpunit": "^6.5 || ^7.5",
2121
"geocoder-php/provider-integration-tests": "^1.0",
2222
"php-http/message": "^1.0",
2323
"php-http/curl-client": "^1.7"

0 commit comments

Comments
 (0)