I've encountered two cases where I needed a render array to be rendered in order to run a twig filter on it, e.g. trim(). Otherwise an error is generated because typically those string functions cannot operate on array. Here is an example to generate a twitter field:https://gist.github.com/scor/9931b6ebf456caa356a6. The workaround I had to use was to descend into the array to find the right value, but that's far from being intuitive and optimal.
Introduce a 'render' filter in twig that would render the array into a string, which can then be passed to other Twig filters.
User interface changes
New filter in twig: render
Beta phase evaluation
|Issue category||Task, small functional addition|
|Issue priority||Normal, helps with some use cases|
|Disruption||Not disruptive at all for core or contrib.|