Notes

Design decisions

commerceguys/addressing

Version 2.3. AddressFormat::getRequiredFields() is documented as returning AddressField[] but returns the class’s string constant values, so validate() carries an inline @var string[] for static analysis. Subdivision mapping first matches the code or full name, then a prefix of the name without spaces (Vic, Qld).

Migration from lh_profile-* meta (lh-tasks #148769)

Same staged pattern as LH Phone Numbers. Every user’s address is migrated, whatever their membership.

  1. Done 22 Nov 2026. History schema (0.3.0). Backfill of every user’s address meta into their own book as residential: 6,280 users, 6,280 addresses, none failed (677 valid, 5,583 incomplete, 20 invalid). Read-only abilities (0.5.0). LH Membership 2.110.0 answers the read and carry filters; 2.111.0 gives clubs their members’ addresses, which gave Princes Park Touch 899 of its 901 members (the other 2 have no address).
  2. Done 22 Nov 2026 (0.6.0). Legacy sync: writes to the meta are copied into the tables once per request and recorded (see Legacy sync); resync-users; backfill pass 3 through the same sync. LH Membership 2.112.0 gives clubs a member’s address when they get one later.
  3. Done 22 Nov 2026 (0.7.0 to 0.10.0). Every reader and writer moved, one plugin at a time: LH Profile Page 3.22.0 to 3.25.1 (field saver, fill fields, field inputs, backend profile table, xProfile, search-users, update-user-profile, reports, Users Insights, CRM token, contact cards via lh_contacts_add_data), LH Mysideline 1.6.0 (CSV import), LH Multisite Importer 1.0.2. Still to do: an account-merge handler on lh_user_identity_merge_handlers.
  4. Done 22 Nov 2026. LH Profile Page (3.26.0, 3.26.1), LH Mysideline (1.7.0) and LH Multisite Importer (1.1.0) require this plugin (Requires Plugins) and have dropped their meta fallbacks. Nothing on the network writes the meta directly any more.
  5. Done 22 Nov 2026 (0.11.0). The mirror into the meta stopped. LH Contacts 0.6.0 refreshes cards on this plugin’s actions, and LH Profile Page 3.26.2 stopped asking it to watch the meta keys and dropped fill-fields’ meta readback. set_user_parts() and the stray-write catch overlay on the address in the tables, the catch only for the keys written. sync_user(), and so the backfill and resync-users, are retired. Stray writes are still recorded. Testing: lh-tasks #155341.
  6. After a quiet period, with #155341 passed, delete the meta (asking Peter first).

Fill rule carried over: if a user has no address, partial parts may be written; once any part exists, a fill changes nothing.