metroCodeonGeoIp2\Record\Locationhas been deprecated. The code values are no longer being maintained.
- 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.
- 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 classes and therecordproperty on record classes have been removed. - BREAKING: On
GeoIp2\Record\Traits, the deprecatedisAnonymousProxyandisSatelliteProviderproperties have been removed. - BREAKING: The
jsonSerializeoutput has changed. GeoIp2\WebService\Clientmethods now throw anInvalidArgumentExceptionif an invalid IP address is passed to them. Previously, they would make a request to the web service and throw aGeoIp2\Exception\InvalidRequestException.- The
isAnycastproperty was added toGeoIp2\Record\Traits. This returnstrueif 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.
- 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.pharfile.
- The
geoip2.pharnow works when included from another directory. Reported by Eduardo Ruiz. GitHub #179.
- The
geoip2.pharincluded 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.
- 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.
- IMPORTANT: PHP 7.2 or greater is now required.
- Added the
isResidentialProxyproperty toGeoIp2\Model\AnonymousIPandGeoIp2\Record\Traits. - Additional type hints have been added.
- PHP 5.6 or greater is now required.
- The
networkproperty was added toGeoIp2\Record\Traits,GeoIp2\Model\AnonymousIp,GeoIp2\Model\Asn,GeoIp2\Model\ConnectionType,Geoip2\Model\Domain, andGeoIp2\Model\Isp. This is a string in CIDR format representing the largest network where all of the properties besidesipAddresshave the same value. - Updated documentation of anonymizer properties -
isAnonymousVpnandisHostingProvider- to be more descriptive. - The
userCountproperty was added toGeoIp2\Record\Traits. This is an integer which indicates the estimated number of users sharing the IP/network during the past 24 hours. This output is available from GeoIP2 Precision Insights. - The
staticIpScoreproperty was added toGeoIp2\Record\Traits. This is a float which indicates how static or dynamic an IP address is. This output is available from GeoIP2 Precision Insights.
- Refer to account IDs using the terminology "account" rather than "user".
- The
isInEuropeanUnionproperty was added toGeoIp2\Record\CountryandGeoIp2\Record\RepresentedCountry. This property istrueif the country is a member state of the European Union.
- The following new anonymizer properties were added to
GeoIp2\Record\Traitsfor use with GeoIP2 Precision Insights:isAnonymous,isAnonymousVpn,isHostingProvider,isPublicProxy, andisTorExitNode.
- Code clean-up and tidying.
- Set minimum required PHP version to 5.4 in
composer.json. Previously, 5.3 would work but was not tested. Now 5.4 is hard minimum version.
- Support for PHP 5.3 was dropped.
- Added support for GeoLite2 ASN database.
- Additional error checking on the data returned from
MaxMind\Db\Readerwas added to help detect corrupt databases. GitHub #83.
isset()onmostSpecificSubdivisionattribute now returns the correct value. Reported by Juan Francisco Giordana. GitHub #81.
isset()onnameattribute now returns the correct value. Reported by Juan Francisco Giordana. GitHub #79.
- Updated documentation to clarify what the accuracy radius refers to.
- Upgraded
maxmind/web-service-commonto 0.3.0. This version usescomposer/ca-bundlerather than our own CA bundle. GitHub #75. - Improved PHP documentation generation.
- Corrected type annotations in documentation. GitHub #66.
- Updated documentation to reflect that the accuracy radius is now included in City.
- Upgraded web service client, which supports setting a proxy. GitHub #59.
- Added support for the GeoIP2 Enterprise database.
- Corrected case on
JsonSerializableinterface. Reported by Axel Etcheverry. GitHub #56.
JsonSerializablecompatibility interface was moved toGeoIp2\Compatrather than the global namespace to prevent autoloading issues. Reported by Tomas Buteler. GitHub #54.- Missing documentation for the
$postalproperty was added to theGeoIp2\Model\Cityclass. Fix by Roy Sindre Norangshol. GitHub #51. - In the Phar distribution, source files for this module no longer have their documentation stripped, allowing IDE introspection to work properly. Reported by Dominic Black. GitHub #52.
- Updated
maxmind/web-service-commonto version with fixes for PHP 5.3 and 5.4.
- Support for demographics fields
averageIncomeandpopulationDensityin theLocationrecord, returned by the Insights endpoint. - The
isAnonymousProxyandisSatelliteProviderproperties onGeoIP2\Record\Traitshave been deprecated. Please use our GeoIP2 Anonymous IP database to determine whether an IP address is used by an anonymizing service.
- Typo fix in documentation.
maxmind-ws/web-service-commonwas renamed tomaxmind/web-service-common.
- The library no longer uses Guzzle and instead uses curl directly.
- Support for
timeoutandconnectTimoutwere added to the$optionsarray passed to theGeoIp2\WebService\Clientconstructor. Pull request by Will Bradley. GitHub #36.
- The 2.1.0 Phar builds included a shebang line, causing issues when loading it as a library. This has been corrected. GitHub #33.
- Update ApiGen dependency to version that isn't broken on case sensitive file systems.
- Added support for the GeoIP2 Anonymous IP database. The
GeoIP2\Database\Readerclass now has ananonymousIpmethod which returns aGeoIP2\Model\AnonymousIpobject. - Boolean attributes like those in the
GeoIP2\Record\Traitsclass now returnfalseinstead ofnullwhen they were not true.
- First production release.
- IMPORTANT: The deprecated
omni()andcityIspOrg()methods have been removed fromGeoIp2\WebService\Client.
- The check added to the
GeoIP2\Database\Readerlookup methods in 0.8.0 did not work with the GeoIP2 City Database Subset by Continent with World Countries. This has been fixed. Fixes GitHub issue #23.
- The
GeoIp2\Database\Readerlookup methods (e.g.,city(),isp()) now throw aBadMethodCallExceptionif they are used with a database that does not match the method. In particular, doing acity()lookup on a GeoIP2 Country database will result in an exception, and vice versa. - A
metadata()method has been added to theGeoIP2\Database\Readerclass. This returns aMaxMind\Db\Reader\Metadataclass with information about the database. - The name attribute was missing from the RepresentedCountry class.
- The web service client API has been updated for the v2.1 release of the web
service. In particular, the
cityIspOrgandomnimethods onGeoIp2\WebService\Clientshould be considered deprecated. Thecitymethod now provides all of the data formerly provided bycityIspOrg, and theomnimethod has been replaced by theinsightsmethod. - Support was added for GeoIP2 Connection Type, Domain and ISP databases.
- With the previous Phar builds, some users received
phar error: invalid url or non-existent pharerrors. The correct alias is now used for the Phar, and this should no longer be an issue.
- The Phar build was broken with Guzzle 3.9.0+. This has been fixed.
- This API now officially supports HHVM.
- The
maxmind-db/readerdependency was updated to a version that does not require BC Math. - The Composer compatibility autoload rules are now targeted more narrowly.
- A
box.jsonfile is included to build a Phar package.
- This API is now licensed under the Apache License, Version 2.0.
- Model and record classes now implement
JsonSerializable. issetnow works with model and record classes.
- Renamed $languages constructor parameters to $locales for both the Client and Reader classes.
- Documentation and code clean-up (Ben Morel).
- Added the interface
GeoIp2\ProviderInterface, which is implemented by both\GeoIp2\Database\Readerand\GeoIp2\WebService\Client.
- This is the first release with the GeoIP2 database reader. Please see the
README.mdfile and the\GeoIp2\Database\Readerclass. - The general exception classes were replaced with specific exception classes representing particular types of errors, such as an authentication error.
- In namespaces and class names, "GeoIP2" was renamed to "GeoIp2" to improve consistency.
- First official beta release.
- Documentation updates and corrections.
GenericExceptionwas renamed toGeoIP2Exception.- We now support more languages. The new languages are de, es, fr, and pt-BR.
- The REST API now returns a record with data about your account. There is
a new
GeoIP\Records\MaxMindclass for this data. - The
continentCodeattribute onContinentwas renamed tocode. - Documentation updates.
- Updated Guzzle version requirement.
- Fixed Composer example in README.md.
- Initial release.