Need to deep merge options for compatibility with other modules

Created on 14 May 2024, about 1 month ago
Updated 28 May 2024, about 1 month ago

Problem/Motivation

Follow-up on 🐛 Compatibility with other modules, options being overwritten. Fixed

I just read the code in the commit and I think it might instead need an array_merge_deep so that all values are preserved and the second array does not override the first one?

For example for attributes:

$a = [
  'attributes' => ['class' => ['a']],
];
$b = [
  'attributes' => ['class' => ['a']],
];
$c = array_merge($a, $b);

will result in

array(1) {
  ["attributes"]=>
  array(1) {
    ["class"]=>
    array(1) {
      [0]=>
      string(1) "b"
    }
  }
}

but I think we need to preserve all values here.

This may also lead to conflicts, if one attribute *should* override, but I don't think we can handle that!

Steps to reproduce

Proposed resolution

Remaining tasks

  1. Discuss:
  2. Implement
  3. Test
  4. Release

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024