- 🇬🇧United Kingdom sp3boy
I am going with #56 which appears to work for my requirements (replacing a basic country selection with an Address field that only captures Country & Administrative Area). Not sure why anything other than "- Select -" would be a better placeholder so not applying #57 myself.
Thanks for the work!
- Status changed to Needs review
over 1 year ago 9:17am 15 August 2023 - 🇷🇸Serbia bojanz
Moving to 2.0.x-dev, as we've closed 8.x-1.x for any risky changes, and this one definitely counts (as evidenced by #45).
Also, bumping the status back to "needs review". Both #45 and #51 indicate that the patch needs further work (or at least exploration).
- Status changed to Needs work
12 months ago 3:29pm 29 December 2023 - 🇷🇸Serbia bojanz
At a glance I can definitely say that we must not modify the address element like this:
diff --git a/src/Element/Address.php b/src/Element/Address.php index b8df3be..f6a55c5 100644 --- a/src/Element/Address.php +++ b/src/Element/Address.php @@ -118,9 +118,7 @@ class Address extends FormElement { // Preselect the default country to ensure it's present in the value. $element['#default_value'] = (array) $element['#default_value']; $element['#default_value'] = self::applyDefaults($element['#default_value']); - if (empty($element['#default_value']['country_code']) && $element['#required']) { - $element['#default_value']['country_code'] = Country::getDefaultCountry($element['#available_countries']); - } +
This is the big BC break that is breaking Commerce tests.
For this patch to be committable, it needs to limit itself to the country element/field only, leaving the address UX unchanged.
- 🇧🇪Belgium nils.destoop
Re-roll of the patch on the 2.x branch as starting point