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

Reference: https://www.drupal.org/core/beta-changes
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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JeroenT’s picture

Issue summary: View changes
JeroenT’s picture

Issue summary: View changes
JeroenT’s picture

Issue tags: -@deprecated. +@deprecated
JeroenT’s picture

Issue tags: +Needs change record
JeroenT’s picture

Title: Remove deprecated methods on BubbleableMetadata class. » Remove usage deprecated methods on BubbleableMetadata class.
Mile23’s picture

Title: Remove usage deprecated methods on BubbleableMetadata class. » Remove usage of @deprecated methods on BubbleableMetadata class.
Issue summary: View changes
Parent issue: » #2205673: [META] Remove all @deprecated functions marked "remove before 8.0"

Patch still applies. Re-running the test.

Mile23’s picture

Status: Needs review » Needs work

The patch is ready but it still needs a change record.

JeroenT’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record
Mile23’s picture

Status: Needs review » Reviewed & tested by the community

Kewlio. :-)

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.

Wim Leers’s picture

Hurray, thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

We can publish the CR when the other issue is committed.

Committed 6dc5310 and pushed to 8.0.x. Thanks!

  • alexpott committed 6dc5310 on 8.0.x
    Issue #2505937 by JeroenT: Remove usage of @deprecated methods on...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.