Repository navigation
Releases
Releases · maxmind/GeoIP2-php
3.5.0
- The
GeoIp2\Database\Readerlookup methods now declare the
InvalidArgumentExceptionthrown for an invalid IP address and for an IPv6
address in an IPv4-only database. The constructor now declares it for a
missing or unreadable database file. - The
GeoIp2\Database\ReaderPHPDoc now lists more exceptions:
UnexpectedValueExceptionfrom the constructor with the pure PHP reader,
andInvalidDatabaseExceptionfrommetadata()with the C extension.
metadata()no longer declaresInvalidArgumentException, which it cannot
throw. - The minimum version of
maxmind-db/readeris now 1.15.0, and the minimum
version ofmaxmind/web-service-commonis now 0.12.0.geoip2.pharbundles
these versions or later. The 3.4.0 phar bundledmaxmind-db/reader1.13.1,
which lacks the decoder limits for crafted databases (GHSA-hj94-g986-h9r7).
See the release notes for
maxmind-db/reader 1.15.0
and
maxmind/web-service-common 0.12.0. - Most concrete classes that no other class extends are now marked
@final.
They will befinalin the next major version. Static analyzers such as
PHPStan report a class that extends them. These classes stay open:GeoIp2\Exception\GeoIp2Exception,GeoIp2\Exception\HttpException,
GeoIp2\Model\AnonymousIp,GeoIp2\Model\City,GeoIp2\Model\Country,
andGeoIp2\Record\Country, because other classes in this package extend
them.GeoIp2\Record\Location, because the minFraud PHP API extends it.GeoIp2\Database\Reader,GeoIp2\Model\Asn,
GeoIp2\Model\ConnectionType,GeoIp2\Model\Domain,
GeoIp2\Model\Isp, andGeoIp2\Record\Traits, until the next major
version.
3.4.0
- A new
residentialproperty has been added toGeoIp2\Record\Anonymizer.
This property is an instance of the newGeoIp2\Record\AnonymizerFeed
class and provides residential proxy data for the network, including
confidence,networkLastSeen, andproviderName. This may be the only
property with data even when the other anonymizer properties are unset.
This data is available from the GeoIP Insights web service. - Updated the
GeoIp2\Model\Cityconstructor to handle an empty
subdivisionsarray. This provides compatibility with some third-party
databases that publish empty subdivisions arrays. Pull request by Jarek
Jakubowski. GitHub #290. - The
GeoIP2prefix in web service error messages has been changed to
GeoIP.
3.3.0
- A new
anonymizerproperty has been added toGeoIp2\Model\Insights.
This property is an instance ofGeoIp2\Record\Anonymizerand provides
information about whether the IP address belongs to an anonymous network,
VPN provider details (includingconfidence,providerName, and
networkLastSeen), and various anonymity flags. This data is available
from the GeoIP2 Insights web service. - A new
ipRiskSnapshotproperty has been added toGeoIp2\Record\Traits.
This property provides a risk score from 0.01 to 99.99 indicating the risk
associated with the IP address. Higher values indicate higher risk. This is
a static snapshot that is less dynamic than minFraud risk scoring. This
attribute is only available from the GeoIP2 Insights web service. - The
isAnonymous,isAnonymousVpn,isHostingProvider,isPublicProxy,
isResidentialProxy, andisTorExitNodeproperties in
GeoIp2\Record\Traitshave been deprecated. Please use the corresponding
properties in the newanonymizerobject in the Insights response instead.
3.2.0
- Support for the GeoIP Anonymous Plus database has been added. To do a
lookup in this database, use theanonymousPlusmethod on
GeoIP2\Database\Reader. metroCodeonGeoIp2\Record\Locationhas been deprecated. The code
values are no longer being maintained.
3.1.0
3.0.0
- IMPORTANT: PHP 8.1 or greater is now required.
- BREAKING: Read-only properties are now used for the model and record
classes rather than magic methods. This significantly improves performance. - BREAKING: The
rawproperty on model classess and therecordproperty on
record classes have been removed. - BREAKING: On
GeoIp2\Record\Traits, the deprecatedisAnonymousProxyand
isSatelliteProviderproperties have been removed. - BREAKING: The
jsonSerializeoutput has changed. GeoIp2\WebService\Clientmethods now throw anInvalidArgumentException
if an invalid IP address is passed to them. Previously, they would make
a request to the web service and throw a
GeoIp2\Exception\InvalidRequestException.- The
isAnycastproperty was added toGeoIp2\Record\Traits. This returns
trueif the IP address belongs to an anycast
network. This is available for the
GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country,
City, and Enterprise databases.
2.13.0
2.12.2
2.12.1
2.12.0
- Support for mobile country code (MCC) and mobile network codes (MNC) was added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2 City and Insights web services.
$mobileCountryCodeand$mobileNetworkCodeproperties were added toGeoIp2\Model\Ispfor the GeoIP2 ISP database andGeoIp2\Record\Traitsfor the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022. geoip2.pharis now generated with Box 3.x.