I found some issues in the code of \Drupal\entity_reference_layout\Plugin\Field\FieldWidget\EntityReferenceLayoutWidget that should be fixable easily.
/**
* Layouts available to this widget.
*
* @var array
*/
protected $availableLayouts;
This is never used and could be removed.
* @param Drupal\Core\Render\Renderer $renderer
* Core renderer service.
* @param Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Core entity type manager service.
The namespaces of this comments should be prefixed with a "\" to make them absolute (like the comments below).
$this->entityTypeBundleInfo = $entity_type_bundle_info;
// <snip>
$this->currentUser = $current_user;
Both fields are declared dynamically - they should be declared in the class before they are accessed.
Comments
Comment #2
dermarioHere is my patch, addressing the issues in the ticket description.
Comment #4
justin2pin commentedApplied and pushed to dev. Thanks @dermario!