Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CHANGELOG
=========

3.5.0
3.5.0 (2026-11-17)
------------------

* The `GeoIp2\Database\Reader` lookup methods now declare the
Expand All @@ -13,6 +13,26 @@ CHANGELOG
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](https://github.com/maxmind/MaxMind-DB-Reader-php/releases/tag/v1.15.0)
and
[maxmind/web-service-common 0.12.0](https://github.com/maxmind/web-service-common-php/releases/tag/v0.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 (2026-07-16)
------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You should now have the file `composer.phar` in your project directory.
Run in your project root:

```sh
php composer.phar require geoip2/geoip2:^3.4.0
php composer.phar require geoip2/geoip2:^3.5.0
```

You should now have the files `composer.json` and `composer.lock` as well as
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
}
],
"require": {
"maxmind-db/reader": "^1.13.0",
"maxmind/web-service-common": "~0.11",
"maxmind-db/reader": "^1.15.0",
"maxmind/web-service-common": "~0.12",
"php": ">=8.1",
"ext-json": "*"
},
Expand Down
145 changes: 79 additions & 66 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Exception/AddressNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* This class represents a generic error.
*
* @final
*/
// phpcs:disable
class AddressNotFoundException extends GeoIp2Exception {}
2 changes: 2 additions & 0 deletions src/Exception/AuthenticationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* This class represents a generic error.
*
* @final
*/
// phpcs:disable
class AuthenticationException extends GeoIp2Exception {}
2 changes: 2 additions & 0 deletions src/Exception/InvalidRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/**
* This class represents an error returned by MaxMind's GeoIP
* web service.
*
* @final
*/
class InvalidRequestException extends HttpException
{
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/OutOfQueriesException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* This class represents a generic error.
*
* @final
*/
// phpcs:disable
class OutOfQueriesException extends GeoIp2Exception {}
2 changes: 2 additions & 0 deletions src/Model/AnonymousPlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* This class provides the GeoIP Anonymous Plus model.
*
* @final
*/
class AnonymousPlus extends AnonymousIp
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/Enterprise.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*
* See https://dev.maxmind.com/geoip/docs/web-services/?lang=en for more
* details.
*
* @final
*/
// phpcs:disable
class Enterprise extends City {}
2 changes: 2 additions & 0 deletions src/Model/Insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* See https://dev.maxmind.com/geoip/docs/web-services/?lang=en for
* more details.
*
* @final
*/
class Insights extends City
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/Anonymizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Contains data for the anonymizer record associated with an IP address.
*
* This record is returned by the GeoIP Insights web service.
*
* @final
*/
class Anonymizer implements \JsonSerializable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/AnonymizerFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* proxies. Additional anonymizer types may be added in the future.
*
* This record is returned by the GeoIP Insights web service.
*
* @final
*/
class AnonymizerFeed implements \JsonSerializable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*
* This record is returned by all location services and databases besides
* Country.
*
* @final
*/
// phpcs:disable
class City extends AbstractPlaceRecord {}
2 changes: 2 additions & 0 deletions src/Record/Continent.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Contains data for the continent record associated with an IP address.
*
* This record is returned by all location services and databases.
*
* @final
*/
class Continent extends AbstractNamedRecord
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/MaxMind.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Contains data about your account.
*
* This record is returned by all location services and databases.
*
* @final
*/
class MaxMind implements \JsonSerializable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/Postal.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*
* This record is returned by all location databases and services besides
* Country.
*
* @final
*/
class Postal implements \JsonSerializable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Record/RepresentedCountry.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* This class contains the country-level data associated with an IP address
* for the IP's represented country. The represented country is the country
* represented by something like a military base.
*
* @final
*/
class RepresentedCountry extends Country
{
Expand Down
Loading
Loading