Skip to content

Releases

3.5.0

Choose a tag to compare

@oschwald oschwald released this 17 Nov 23:29
Immutable release. Only release title and notes can be modified.
9d3d3b4
  • The GeoIp2\Database\Reader lookup methods now declare the
    InvalidArgumentException thrown 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\Reader PHPDoc now lists more exceptions:
    UnexpectedValueException from the constructor with the pure PHP reader,
    and InvalidDatabaseException from metadata() with the C extension.
    metadata() no longer declares InvalidArgumentException, which it cannot
    throw.
  • The minimum version of maxmind-db/reader is now 1.15.0, and the minimum
    version of maxmind/web-service-common is now 0.12.0. geoip2.phar bundles
    these versions or later. The 3.4.0 phar bundled maxmind-db/reader 1.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 be final in 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,
      and GeoIp2\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, and GeoIp2\Record\Traits, until the next major
      version.

3.4.0

Choose a tag to compare

@oschwald oschwald released this 16 Jul 22:11
Immutable release. Only release title and notes can be modified.
257a350
  • A new residential property has been added to GeoIp2\Record\Anonymizer.
    This property is an instance of the new GeoIp2\Record\AnonymizerFeed
    class and provides residential proxy data for the network, including
    confidence, networkLastSeen, and providerName. 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\City constructor to handle an empty
    subdivisions array. This provides compatibility with some third-party
    databases that publish empty subdivisions arrays. Pull request by Jarek
    Jakubowski. GitHub #290.
  • The GeoIP2 prefix in web service error messages has been changed to
    GeoIP.

3.3.0

Choose a tag to compare

@oschwald oschwald released this 20 Nov 18:50
49fcedd
  • A new anonymizer property has been added to GeoIp2\Model\Insights.
    This property is an instance of GeoIp2\Record\Anonymizer and provides
    information about whether the IP address belongs to an anonymous network,
    VPN provider details (including confidence, providerName, and
    networkLastSeen), and various anonymity flags. This data is available
    from the GeoIP2 Insights web service.
  • A new ipRiskSnapshot property has been added to GeoIp2\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, and isTorExitNode properties in
    GeoIp2\Record\Traits have been deprecated. Please use the corresponding
    properties in the new anonymizer object in the Insights response instead.

3.2.0

Choose a tag to compare

@oschwald oschwald released this 05 May 21:18
b7aa587
  • Support for the GeoIP Anonymous Plus database has been added. To do a
    lookup in this database, use the anonymousPlus method on
    GeoIP2\Database\Reader.
  • metroCode on GeoIp2\Record\Location has been deprecated. The code
    values are no longer being maintained.

3.1.0

Choose a tag to compare

@oschwald oschwald released this 15 Nov 16:33
c86fbea
  • This library no longer uses implicitly nullable parameter types. This
    will fix deprecation warning in PHP 8.4. Reported by Steven Lewis.
    GitHub #230.
  • The PHPDoc type hints have been improved for use with PHPStan.

3.0.0

Choose a tag to compare

@oschwald oschwald released this 04 Dec 17:16
1a802ce
  • 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 raw property on model classess and the record property on
    record classes have been removed.
  • BREAKING: On GeoIp2\Record\Traits, the deprecated isAnonymousProxy and
    isSatelliteProvider properties have been removed.
  • BREAKING: The jsonSerialize output has changed.
  • GeoIp2\WebService\Client methods now throw an InvalidArgumentException
    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 isAnycast property was added to GeoIp2\Record\Traits. This returns
    true if 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

Choose a tag to compare

@oschwald oschwald released this 05 Aug 20:33
6a41d8f
  • The model class names are no longer constructed by concatenating strings.
    This change was made to improve support for tools like PHP-Scoper.
    Reported by Andrew Mead. GitHub #194.
  • Box 4.0.1 is now used to generate the geoip2.phar file.

2.12.2

Choose a tag to compare

@oschwald oschwald released this 30 Nov 18:15
83adb44
  • The geoip2.phar now works when included from another directory.
    Reported by Eduardo Ruiz. GitHub #179.

2.12.1

Choose a tag to compare

@oschwald oschwald released this 23 Nov 17:01
d256606
  • The geoip2.phar included in 2.12.0 would only work in CLI applications.
    This was due to a change in Box 3.x. The Phar should now work in all
    applications. This release only affects users of the Phar file.

2.12.0

Choose a tag to compare

@oschwald oschwald released this 18 Nov 17:38
a320c2c
  • 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. $mobileCountryCode and $mobileNetworkCode properties were added to GeoIp2\Model\Isp for the GeoIP2 ISP database and GeoIp2\Record\Traits for the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022.
  • geoip2.phar is now generated with Box 3.x.