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
AssertLegacyTrait::assertHeader() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderEquals() instead. See https://www.drupal.org/node/3129738
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#18 | 3139439-D89-and-D90-18.patch | 11.59 KB | Bunty Badgujar |
#18 | 3139439-D88-16.patch | 11.95 KB | Bunty Badgujar |
#6 | 3139439-6.patch | 14.49 KB | mondrake |
#6 | interdiff_4-6.txt | 803 bytes | mondrake |
Comments
Comment #2
jungleAdding the "Deprecated assertions" tag to add this into the kanban board https://contribkanban.com/board/Deprecatedassertions
Comment #3
mondrakeon this.
Comment #4
mondrakeThis seems simple. Replaced calls, removed deprecation silencer, added deprecation test.
Comment #5
daffie CreditAttribution: daffie commentedYou tried to create a second method with the same name.
Comment #6
mondrakeOops. Thank you.
Comment #7
longwaveLooks good to me!
Comment #8
xjmComment #9
xjmTitle cleanup fail.
Comment #11
xjmPerfect, thanks! All remaining references are either the method itself or its legacy tests:
PTBP for a backport that doesn't un-silence the deprecation. Thanks!
Comment #12
Bunty Badgujar CreditAttribution: Bunty Badgujar commentedComment #13
Bunty Badgujar CreditAttribution: Bunty Badgujar commented#6 ported to 8.8.x
Comment #15
mondrake@Bunty Badgujar we have to remove the deprecation test, too - see #3139403-26: Replace usages of deprecated AssertLegacyTrait::assertElement(Not)Present()
Comment #16
Bunty Badgujar CreditAttribution: Bunty Badgujar commented@mondrake, Thanks for this information. I thought deprecation test handle similar to 9.x.
Removed deprecation test.
Comment #17
mondrakeLooks ike we need a separate patch for D8.9 and D9.0 - general suggestion: when backporting, go from the highest to the lowest... so that the flows of commit can be 9.0, then 8.9, then 8.8. I doubt core committers will be willing to commit something that leaves holes in between... :)
Comment #18
Bunty Badgujar CreditAttribution: Bunty Badgujar commentedAdding patch for 8.9 and 9.0. Re-adding #16 just to combine all patch in single comment.
Comment #19
mondrakeLGTM
Comment #20
xjmThese look good. There is one other place the old method is used in D8:
Should we fix that too?
Meanwhile I'll commit the 9.0.x patch but just waiting on a retest.
Comment #21
xjmForgot to add a note in the title.
Comment #22
mondrake#20 that's a Simpletest base class, so no, it should not be touched.
Comment #23
xjmAh good call, thanks @mondrake. I did not actually expect them to still be around in 8.9! I guess it's because it was a base class and we didn't want to
rm -rf
those since they can be considered API.Comment #24
Bunty Badgujar CreditAttribution: Bunty Badgujar at Srijan | A Material+ Company for Drupal India Association commentedComment #28
xjmCommitted the backports to 9.0.x, 8.9.x, and 8.8.x. Thanks all!
Comment #29
xjmComment #30
xjm#28 did not take for some reason.