drupal_render() and drupal_render_root() are deprecated global functions. Classes often have to wrap these functions, or a call to get the renderer service, for testing purposes when the service isn't part of the container. This creates duplicate code in core, and a a goal of adding more test coverage means more classes will need to mock the render.
A trait should be introduce that does this, so it can be added as needed.
Comments
Comment #1
mpdonadioI will work on this, and get a proper summary create. I mainly wanted to have an issue to reference.
Comment #2
dawehnerIdeally we would inject the service if possible.
Comment #3
dawehnerYeah I think a trait is not a solution we want.
Comment #4
mpdonadio