Bump MW version, remove deprecated IP class, update .gitignore

Bug: T247155
Change-Id: Idef39fd39dd8a9f3483ea30e4a01422923c16e05
This commit is contained in:
ankit 2020-03-14 14:31:36 +05:30
parent fe0e56c5c0
commit 95f25aa2ed
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ vendor
composer.lock
node_modules
/.eslintcache
.DS_Store

View file

@ -11,7 +11,7 @@
"type": "other",
"license-name": "MIT",
"requires": {
"MediaWiki": ">= 1.32.0"
"MediaWiki": ">= 1.35.0"
},
"MessagesDirs": {
"CookieWarning": [

View file

@ -4,7 +4,7 @@ namespace CookieWarning;
use Http;
use InvalidArgumentException;
use IP;
use Wikimedia\IPUtils;
/**
* Implements the GeoLocation class, which allows to locate the user based on the IP address.
@ -32,7 +32,7 @@ class HttpGeoLocation implements GeoLocation {
if ( isset( $this->locatedIPs[$ip] ) ) {
return $this->locatedIPs[$ip];
}
if ( !IP::isValid( $ip ) ) {
if ( !IPUtils::isValid( $ip ) ) {
throw new InvalidArgumentException( "$ip is not a valid IP address." );
}
if ( substr( $this->geoIPServiceURL, -1 ) !== '/' ) {