Problem/motivation
Just like all of the ModuleHandler interface issues referenced by this issue: #3277301: Adapt to centralised hook dispatcher in Drupal 9.4
Both EntityTypeManagerInterface and RendererInterface are typehinted with their default/concrete implementation, rather than an interface. Additionally, there are incorrect doc typehinting in the same line.
This prevents other code from changing the Renderer and EntityTypeManager services by changing their default class or by using service decoration, in the case of Pinto Theme in my case.
Combined, when loading the AllowedBlocksForm form, a fatal exception is thrown.
Steps to repro
Install and enable layout_builder_restrictions_by_region + pinto_theme
Load the AllowedBlocksForm form
See: error 500
Proposed resolution
Change to interfaces as is standard.
Issue fork layout_builder_restrictions-3562148
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dpiComment #4
dpiComment #5
mark_fullmerThis change makes sense. Thanks for identifying it and providing the code changes necessary!
Comment #8
dpiThanks @mark_fullmer!