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.
Scheduler testing at core 8.6 and 8.7 in Travis is failing with:
11x SafeMarkup::checkPlain() is scheduled for removal in Drupal 9.0.0. Rely on Twig's auto-escaping feature, or use the @link theme_render #plain_text @endlink key when constructing a render array that contains plain text in order to use the renderer's auto-escaping feature. If neither of these are possible, \Drupal\Component\Utility\Html::escape() can be used in places where explicit escaping is needed. See https://www.drupal.org/node/2549395.
4x in SchedulerRequiredTest::testRequiredScheduling from Drupal\Tests\scheduler\Functional
3x in SchedulerValidationTest::testValidationDuringEdit from Drupal\Tests\scheduler\Functional
2x in SchedulerPermissionsTest::testUserPermissions from Drupal\Tests\scheduler\Functional
2x in SchedulerPastDatesTest::testSchedulerPastDates from Drupal\Tests\scheduler\Functional
Tests on Travis: https://travis-ci.org/jonathan1055/scheduler/branches
Change record: https://www.drupal.org/node/2549395
Comment | File | Size | Author |
---|---|---|---|
#12 | 3034986-12.remove_checkplain.patch | 8.33 KB | jonathan1055 |
|
Comments
Comment #2
Satyanarayan Reddy CreditAttribution: Satyanarayan Reddy at Melity commentedReplace SafeMarkup::checkPlain()
Comment #3
Satyanarayan Reddy CreditAttribution: Satyanarayan Reddy at Melity commentedReplace SafeMarkup
Comment #5
Satyanarayan Reddy CreditAttribution: Satyanarayan Reddy at Melity commentedReplace deprecated function
Comment #6
thallesApplied with success!
Comment #7
thallesThanks @Satyanarayan Reddy
Comment #8
thallesComment #10
thallesApplied with success! #5
Comment #11
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedLinked to parent issue.
Comment #12
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedLooking at these tests more closely, only two of them (pastdates and permissoin) actually need to escape the title text. The
requiredScheduling
test uses node title values created from hard-coded test data. TheValidation
test has titles generated via$this->drupalCreateNode
which only contain letters and digits not anything which needs escaping. So let's not do unnecessary work in the tests.Comment #14
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThanks @Satyanarayan Reddy for the original patch. Fixed and committed.
Now that we have removed all deprecation notices when running core 8.6 the Travis tests now pass at 8.6 as well as 8.5
https://travis-ci.org/jonathan1055/scheduler/branches