You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pure PHP reader now rejects non-string map keys with InvalidDatabaseException instead of a TypeError, a warning, or an
implicit type conversion.
The pure PHP reader now rejects malformed metadata with InvalidDatabaseException instead of a TypeError, a warning, or an
implicit type conversion. Missing optional languages and description
fields default to empty arrays.
Missing gmp/bcmath support and offsets that exceed the platform limit now
throw MaxMind\Db\Reader\UnsupportedPlatformException. It extends RuntimeException, so existing catches continue to work.
The pure PHP reader also throws UnsupportedPlatformException when the
metadata node count or the start of the data section exceeds the platform's
integer limit. These cases no longer produce InvalidDatabaseException or
overflow into a TypeError.
phpinfo() and php --ri maxminddb now show whether the extension was built
with the bundled libmaxminddb or links a system library. The libmaxminddb library version row reads, for example, 1.14.0 (bundled) or 1.9.1 (system). Pull request by Remi Collet. GitHub #289.
The PHPDoc of the pure PHP reader now lists the exceptions that its methods
can throw:
The MaxMind\Db\Reader constructor, get(), and getWithPrefixLen()
declare UnsupportedPlatformException. The reader throws it when an
integer needs gmp or bcmath and neither is installed, or a data offset
exceeds the platform limit.
The constructor declares UnexpectedValueException.
close() declares BadMethodCallException in place of Exception. metadata() no longer declares InvalidArgumentException, which it
cannot throw.
MaxMind\Db\Reader\Decoder::decode() and MaxMind\Db\Reader\Util::read()
declare their exceptions.
The bundled libmaxminddb used by --with-maxminddb-bundled builds of the
extension is now 1.14.1. This fixes a build failure with -Werror on
platforms where ssize_t is 32 bits, such as i686.
The classes in the pure PHP reader are now marked @final. They will be final in the next major version. Static analyzers such as PHPStan report
a class that extends them.
On 64-bit Windows, the extension returned uint32 and uint64 values
from 2^31 to PHP_INT_MAX as strings. It now returns them as integers.