Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After the decision to make countries fieldable entities, this was almost inevitable. This provides a lot better integration and advantages with a number of other contrib modules that use this API.
Other API changes of importance:
countries_get_countries() could throw an exception. [API CHANGE]
If not a core property and a test country does not have this property either, this throws an exception.
Deprecated countries_get_country() [API CHANGE]
This is replaced with country_load(). All calls to countries_get_country() have a watchdog entry warning about the deprecated function and returns country_load() results.
String changes
There have been a number of changes and more consistency has been added to make this process easier.
Country field internal data array
This is normalised so that the safe_value parameter is used instead of the safe parameter.
#1130506 - Apache Solr integration
#1173230 - New continent and continent code formatters
#1183186 - New sub-module to help store country specific data
Integration with CountryIcons v2
New hooks for listening to country changes.
* hook_country_insert()
* hook_country_update()
* hook_country_delete()
Disclaimer: The automated upgrade path from countries-7.x-1.x to countries-7.x-2.x has had limited testing (29 April 2011). Please check all of your country fields configuration options.
This is a developmental release that marks the switch from a custom country widget to the use of Drupal core options widget.