Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Per comments 72.7, 73.7, 77, 82 and 93 in #2407195: Move attachment processing to services and per-type response subclasses, this is what happened, for consistency with other code in D8 HEAD:
@@ -14,28 +14,29 @@
- protected $attachments = [
- 'library' => [],
- 'drupalSettings' => [],
- 'html_head' => [],
- 'feed' => [],
- 'html_head_link' => [],
- 'http_header' => [],
- ];
+ protected $attachments = [];
But, Crell feels this removes predictability; he feels it'd be better to have those keys present, so that one can reliably do ->getAttachments()['library']
, without the need for an isset()
.
Proposed resolution
TBD
Remaining tasks
TBD
User interface changes
None.
API changes
TBD
Data model changes
TBD
Comments
Comment #1
mgifford