- 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.