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::assertTextHelper() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->pageTextContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738
We missed to open an issue for this, and also the deprecation message is wrong.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#8 | rawdiff_3-8.txt | 855 bytes | mondrake |
#8 | 3168946-8.patch | 5.94 KB | mondrake |
Comments
Comment #2
mondrakePatch
Comment #3
mondrakeComment #4
paulocsHey @mondrake,
Why did you remove
'AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->pageTextContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738'
from the code?Cheers, Paulo.
Comment #5
mondrake@paulocs - re #4 because that deprecation message is triggered currently from
assertTextHelper
, but it is wrong because it is mistakingly indicating that it's referring toassertText
.So, this removal
is actually balanced by the change of the actual deprecation message triggered by
assertTextHelper
,Comment #6
longwaveI guess we have to deprecate this properly, I thought nobody would be using it directly but it turns out contrib has a few hits: http://grep.xnddx.ru/search?text=assertTextHelper&filename=
Makes sense to move the code out so only direct callers get the real deprecation.
Comment #7
mondrakeComment #8
mondrakeReroll, only patch context conflicts to be resolved.
Comment #10
catchCommitted 6be889d and pushed to 9.1.x. Thanks!