Has anyone worked with nested lineItems before? I found references in the docs and also stumbled upon some tests where a lineItem is a LineItemCollection:
public function testCartWithNestedLineItemHasChildren(): void
{
$cart = new Cart('test', 'test');
$cart->add(
(new LineItem('nested', 'nested'))
->setChildren(
new LineItemCollection([
(new LineItem('A', 'test'))->setGood(true),
(new LineItem('B', 'test'))->setGood(true),
])
)
);
$cart->add(
(new LineItem('flat', 'flat'))->setGood(true)
);
static::assertCount(4, $cart->getLineItems()->getFlat());
static::assertCount(2, $cart->getLineItems());
}
Is this feature well-supported? It is for example impossible to create a nested lineItem through the admin "create order" interface and I also did not find a way to create nested items through the storefront. What is the intended use case of this feature?