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
Drupal\Core\Render\BubbleableMetadata
contains deprecated methods that should be removed before 8.0 release
Part of #2205673: [META] Remove all @deprecated functions marked "remove before 8.0".
Proposed resolution
The following methods should be replaced:
Method | Replacement |
---|---|
BubbleableMetadata::getAssets() | BubbleableMetadata::getAttachments() |
BubbleableMetadata::addAssets() | BubbleableMetadata::addAttachments() |
BubbleableMetadata::setAssets() | BubbleableMetadata::setAttachments() |
Remaining tasks
File issue for removing the methods themselves.
Beta phase evaluation
Issue category | Task. Work must be done to remove these 3 @deprecated methods before 8.0.0 release. |
---|---|
Issue priority | Normal because Drupal 8 still works with these deprecated methods still in place. |
Prioritized changes | The main goal of this issue is removing code already deprecated for 8.0.0. |
Comment | File | Size | Author |
---|---|---|---|
remove_usage_deprecated_methods_BubbleableMetadata.patch | 7.23 KB | JeroenT | |
Comments
Comment #1
JeroenTComment #2
JeroenTComment #3
JeroenTComment #4
JeroenTComment #5
JeroenTComment #6
Mile23Patch still applies. Re-running the test.
Comment #8
Mile23The patch is ready but it still needs a change record.
Comment #9
JeroenTCreated draft change record: BubbleableMetadata::*assets methods removed()
Comment #10
Mile23Kewlio. :-)
My IDE couldn't find any occurrences of the *Assets methods, and they have all been replaced with *Attachments methods.
Change record linked above.
Deletion issue here: #2505941: Remove deprecated methods on BubbleableMetadata class.
Comment #11
Wim LeersHurray, thanks!
Comment #12
alexpottWe can publish the CR when the other issue is committed.
Committed 6dc5310 and pushed to 8.0.x. Thanks!