Major improvements in addressfield 7.x-1.0-rc1
Many people know that addressfield hasn’t been the easiest module to maintain.
There are over 200 countries in the world, each with its own addressing requirements.
Addressfield attempted to provide a sane default for all of them, along with a plugin architecture for handling per-country customizations. But with so many countries, the list of needed improvements became never-ending, and the customizations themselves started gathering in only one plugin (address.inc), which quickly became impossible to maintain.
A radical change was needed, so after a lot of research we introduced a new plan for Drupal 8, along with a brand new PHP library we can depend on from addressfield 8.x-2.x.
The new plan resolves around two powerful ideas:
- The introduction of address formats, which hold information on how a country’s address and its form need to be rendered and validated.
- The use of Google’s addressing dataset, freely available and built for Chrome and Android, with address formats for 200 countries.
The introduced solutions were obviously superior to anything we had before that, but Drupal 8 is still far from production, and we needed improvements on our Drupal 7 sites today, so we decided to try and backport as many concepts as we could into the 7.x-1.x codebase. The result of that is addressfield 7.x-1.0-rc1: