- Issue created by @Grevil
- last update
over 1 year ago 11 pass, 2 fail - @grevil opened merge request.
- Status changed to Needs review
over 1 year ago 3:04pm 18 July 2023 - 🇩🇪Germany Grevil
Done, please review! We should also cherry-pick this in 4.x!
This is how "preload" looked before:
- last update
over 1 year ago 15 pass - 🇩🇪Germany Anybody Porta Westfalica
I'm wondering why config inspector did not complain... but perhaps it wasn't possible to compare due to the specific case...
Did you test the update hook? That's the dangerous part...
- Status changed to Needs work
over 1 year ago 3:09pm 18 July 2023 - last update
over 1 year ago 15 pass - Status changed to Needs review
over 1 year ago 3:14pm 18 July 2023 - 🇩🇪Germany Grevil
Ok, works as expected now! This is the new output after running the update hook:
\Drupal::configFactory()->getEditable(...)->get(...) array (2) ⇄amountBefore => integer 1 ⇄amountAfter => integer 1
- Status changed to Needs work
over 1 year ago 3:18pm 18 July 2023 - 🇩🇪Germany Grevil
Actually, since we are using the js spread operator in 5.x we should check how the spread operator handles the array first, before commiting this.
- last update
over 1 year ago 15 pass - 🇩🇪Germany Grevil
Yep, thought so... preload is now a js object instead of an array, probably breaking its functionality.
- Status changed to Closed: won't fix
over 1 year ago 1:11pm 4 August 2023 - Status changed to Active
over 1 year ago 3:11pm 4 August 2023 - 🇩🇪Germany Anybody Porta Westfalica
@Grevil: I'll reopen this, so we don't forget to talk about this. I don't get it here... ;)
We can of cours decide to close it then. - Status changed to Closed: works as designed
over 1 year ago 7:10am 7 August 2023 - 🇩🇪Germany Anybody Porta Westfalica
Finally:
The schema is correct as - is, without any change. It just allows unlimited entries, while only two are allowed.The proposed MR would make it an object, which would be even worse.
The alternative fix would have been to explicitly save the two values separately and turn them into an array in PHP or JS, but it should be OK to just keep it this way.