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::assertUrl() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->addressEquals() 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 |
---|---|---|---|
#25 | rawdiff_23-25.txt | 1.43 KB | mondrake |
#25 | 3139419-25.patch | 124.25 KB | mondrake |
#23 | interdiff_18-23.txt | 852 bytes | mondrake |
#23 | 3139419-23.patch | 124.21 KB | mondrake |
#18 | 3139419-18.patch | 123.8 KB | mondrake |
Comments
Comment #2
mondrakeComment #3
jungleAdding the "Deprecated assertions" tag to add this into the kanban board https://contribkanban.com/board/Deprecatedassertions
Comment #4
mondrakeKick-off, just removing the silencer.
Comment #6
aleevasAdded patch with replacements
Comment #8
aleevasFixed failed tests
Comment #9
mondrakeThanks! This needs a 'deprecation test', to show that if
assertUrl
is still called, then the deprecation error is triggered.I am taking the issue to do that.
Comment #10
mondrakeAdded a deprecation test.
We still have calls to assertUrl that pass in the $message argument, even if that is stale already. In other issues we are postponing on those being removed, here at least we need a follow-up. Please do not remove or refactor those here, since latest direction is to just do the method call change in these issues.
Comment #11
mondrakeActually, there is even an $option argument passed in, the empty array here in some cases, which is stale too. All in all, better postpone this one to an issue to cleanup the board.
Comment #12
mondrakeFiled #3143870: Calls to AssertLegacyTrait::assertUrl() have wrong number of arguments.
Comment #13
mondrakeParent issues were committed, we can work on this now.
Comment #14
mondrakeon this.
Comment #15
mondrakeRerolled. Should be pretty straightforward to review now, having done #3164686: WebAssert::addressEquals() and AssertLegacyTrait::assertUrl() fail to check the querystring and #3143870: Calls to AssertLegacyTrait::assertUrl() have wrong number of arguments already.
Comment #16
mondrakeComment #17
jungleNeeds reroll again :(
Comment #18
mondrakeComment #19
jungleIt's ok to keep the one usage in inline comment in DefaultViewsTest to me.
Tested and removed as expected
If no CS violations and the testing passes, it's RTBC to me. Cycling back later.
Comment #20
jungleNo CS violations and GREEN as expected. Thanks @mondrake!
Comment #21
catch#19.1 I think we should actually update that here - either by changing the commented code, changing and uncommenting it, or removing it if the assertion is really not needed. Or if not add a follow-up to deal with the commented assertions in that test.
Comment #22
mondrakeComment #23
mondrakeRerolled, and re #19.1 just changed the commented code, since refactoring further seems to me OOS here. RTBC since it's only change to docs.
Comment #24
catchNeeds another re-roll..
Comment #25
mondrakeReroll.
Comment #27
catchCommitted c09dc39 and pushed to 9.1.x. Thanks!
Comment #28
alexpottFor some reason this is still in the rtbc queue so pressing save again...