Problem/Motivation
Surfaced by @alexpott in #3398982: ConfigFormBase + validation constraints: support non-1:1 form element-to-config property mapping again at https://git.drupalcode.org/project/drupal/-/merge_requests/5240/diffs#no...
Steps to reproduce
Two #config_targets with the same targeted property path currently just overwrite each other 😬
Proposed resolution
Throw a \LogicException with a helpful message.
Remaining tasks
- ✅
Tests. - ✅
Fix. - Reviews.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
None.
Issue fork drupal-3401186
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wim leersComment #4
wim leersComment #5
borisson_I'm not sure about the error message here, it limits to two, while there could be even more. It is the tiniest of nitpicks though, so setting rtbc regardless.
Comment #6
phenaproximaNo notes! +1 RTBC here.
Comment #8
alexpott@borisson_ given we're looping through here we can only detect one clash at a time. But once you've removed one - if there is another clash we'll throw another exception.
Comment #9
alexpottCommitted and pushed 40084a52b03 to 11.x and 23141ce25e6 to 10.2.x. Thanks!
Backported to 10.2.x because this is a bugfix to a feature.