HtmlResponseAttachmentsProcessor::processAttachments lists the keys expected in the #attached part of the final render array (i.e. $response->getAttachments()):
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
The list includes library and feed, but not placeholders. However, one of the first actions of this method is to call ::renderPlaceholders!
Given that the Drupal 8 render pipeline docs:
https://www.drupal.org/docs/8/api/render-api/the-drupal-8-render-pipeline
try to explain placeholders as being injected at this point, then I think the method's own docblock should at least mention them, even if it makes clear that they should have been set automatically by earlier stages in the pipeline.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 2849246.patch | 836 bytes | catch |
Comments
Comment #2
jp.stacey commentedComment #12
catchThe doc for this method comes from the interface, but ::renderPlaceholders() is on the concrete class, so all we can do is cross-reference. Here's a patch, but reclassifying as a task since the documentation is fine, I'm not even sure about the cross-reference from interface method to protected class method, but can't see another way.
Comment #15
smustgrave commentedSeems like a simple update. Ran against 10.1 to just be sure.
Comment #16
longwaveExpanded the wording and added a backslash on commit. Backported to 10.0.x and 9.5.x.
A shame that this took so long to fix. Rest in peace, jp.stacey.
Comment #20
wim leersThanks! 🤩 I never reviewed this because this wasn't under the
big_pipe.modulecomponent 😅