Problem/Motivation
In #3546376: Use the 'yield' option instead of output buffering for twig rendering to support async rendering I advocated for converting MarkupInterface objects into Twig\Markup objects in order to retain the safeness indications. However after reading the upstream code - see https://github.com/twigphp/Twig/blob/3.x/src/Runtime/EscaperRuntime.php#... and specifically the way it cast objects with classes or interfaces in \Twig\Runtime\EscaperRuntime::$safeClasses to string I feel I made the wrong call.
Proposed resolution
Don't use Twig\Markup objects - just cast to string an be done.
Remaining tasks
Update a change record, https://www.drupal.org/node/3546663
User interface changes
None
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
N/a
Issue fork drupal-3547965
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:
- 3547965-dont-create-twigmarkup
changes, plain diff MR !13292
Comments
Comment #3
alexpottComment #4
nod_The new tests are still passing and it makes sense based on upstream code,
Comment #6
catchCommitted/pushed to 11.x, thanks!
Comment #9
quietone commentedI don't see that the change record has been updated.
Comment #10
catchCR is correct afaict, not sure if it was updated since, or possibly not before the last minute change in the previous issue.