- Issue created by @wim leers
Discovered at #3469442-6: Impossible to drop a component into an empty column of the two → .
Quoting \Drupal\KernelTests\Components\ComponentRenderTest::checkRenderElementAlters()
:
'#propsAlter' => [
fn ($props) => [...$props, 'heading' => $this->t('I am another banner')],
],
If you put a breakpoint there, you can indeed see all props:
Quoting from that same test:
'#slotsAlter' => [
static fn ($slots) => [...$slots, 'banner_body' => ['#markup' => '<h2>Just something else.</h2>']],
],
If you put a breakpoint there, you do NOT see all slots, but just the value/contents of one slot at a time:
If you look at the altered result, the problem is clear:
👆 Rather than having added #markup
to banner_body
, we've altered banner_body => ['#markup' ⇒ …]
into banner_body
😅
See above.
TBD — AFAICT fixing this requires a BC break? 😬
Active
11.0 🔥
Enhances developer experience.