SafeMarkup::format() in RedirectLoopException.php is deprecated and scheduled for removal in Drupal 9.0.0. We should use \Drupal\Component\Render\FormattableMarkup instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | deprecated_safemarkup_call-3005422-2.patch | 890 bytes | laravz |
Comments
Comment #2
laravz commentedComment #3
laravz commentedComment #4
berdirthanks, but this is a pretty bad pattern anyway, since we then use this dynamic message again and log it, resulting in translating it again there.
Using safe markup or formattable markup in exception messages deprecated anyway, what we should instead is add properties and getter methods for this information, so that in \Drupal\redirect\EventSubscriber\RedirectRequestSubscriber::onKernelRequestCheckRedirect, where we catch it, we log the it with the original message with placeholders.
The exception message itself then doesn't need to use % anymore and can just concatenate things together.
Comment #5
kristen polPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.
Comment #6
idebr commentedThis issue was fixed in #3051124: Remove Drupal 8.7 and earlier deprecations, compatibility with Drupal 9