Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Component / Utility / SafeMarkup.php
index b2d00a3090154c6e4b0637b689672f4afda2a02e..a3f2d6818f194a27537b531de18756c762e1ddf3 100644 (file)
@@ -40,6 +40,7 @@ class SafeMarkup {
    * @see https://www.drupal.org/node/2549395
    */
   public static function isSafe($string, $strategy = 'html') {
+    @trigger_error('SafeMarkup::isSafe() is scheduled for removal in Drupal 9.0.0. Instead, you should just check if a variable is an instance of \Drupal\Component\Render\MarkupInterface. See https://www.drupal.org/node/2549395.', E_USER_DEPRECATED);
     return $string instanceof MarkupInterface;
   }
 
@@ -66,6 +67,7 @@ class SafeMarkup {
    * @see drupal_validate_utf8()
    */
   public static function checkPlain($text) {
+    @trigger_error('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.', E_USER_DEPRECATED);
     return new HtmlEscapedText($text);
   }
 
@@ -93,6 +95,7 @@ class SafeMarkup {
    * @see https://www.drupal.org/node/2549395
    */
   public static function format($string, array $args) {
+    @trigger_error('SafeMarkup::format() is scheduled for removal in Drupal 9.0.0. Use \Drupal\Component\Render\FormattableMarkup. See https://www.drupal.org/node/2549395.', E_USER_DEPRECATED);
     return new FormattableMarkup($string, $args);
   }