Change record status: 
Project: 
Introduced in branch: 
9.1.x
Introduced in version: 
9.1.0
Description: 

To allow altering of the LayoutBuilder element in pre_render, an event is now dispatched and functionality has been moved to an event subscriber. As such, Drupal\layout_builder\Element\LayoutBuilder will no longer require the layout_builder.tempstore_repository nor the messenger service and will instead require the event_dispatcher service.

This code affects custom modules extending the original class:

Before:

class myCustomClass extends Layoutbuilder {

  public function __construct(array $configuration, $plugin_id, $plugin_definition, LayoutTempstoreRepositoryInterface $layout_tempstore_repository, MessengerInterface $messenger) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $layout_tempstore_repository, $messenger);
  }

}

After:

class myCustomClass extends Layoutbuilder {

  public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher);
  }

}
Impacts: 
Module developers