I checked drupal 9 compatibilities for this module in drupal-check I found the following deprecated methods.

60/60 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ --------------------------------------------------------------------------------------
Line src/Controller/TetherStatsTrackController.php
------ --------------------------------------------------------------------------------------
190 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
190 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
------ --------------------------------------------------------------------------------------

------ ------------------------------------------------------------------
Line src/Form/TetherStatsElementFinderForm.php
------ ------------------------------------------------------------------
262 Call to deprecated function entity_load():
in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the
entity type storage's load() method.
419 Call to deprecated function db_or():
as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Create
a \Drupal\Core\Database\Query\Condition object, specifying an OR
conjunction: new Condition('OR');
428 Call to deprecated function db_or():
as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Create
a \Drupal\Core\Database\Query\Condition object, specifying an OR
conjunction: new Condition('OR');
------ ------------------------------------------------------------------

------ ------------------------------------------------------------------
Line src/Plugin/tether_stats/Chart/TetherStatsChartRendererGoogle.php
------ ------------------------------------------------------------------
246 Call to deprecated function format_date():
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal::service('date.formatter')->format().
250 Call to deprecated function format_date():
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal::service('date.formatter')->format().
254 Call to deprecated function format_date():
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal::service('date.formatter')->format().
259 Call to deprecated function format_date():
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal::service('date.formatter')->format().
------ ------------------------------------------------------------------

------ ----------------------------------------------------------------------------------
Line src/Tests/TetherStatsAnalyticsStorageTest.php
------ ----------------------------------------------------------------------------------
162 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
162 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
182 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
182 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
226 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
226 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
246 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
246 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
358 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
------ ----------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------
Line src/Tests/TetherStatsIdentitySetTest.php
------ ----------------------------------------------------------------------------------
55 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
55 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
68 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
68 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
82 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
97 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
106 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
106 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
148 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
148 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
154 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
163 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
163 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
178 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
178 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
228 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
228 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
236 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
248 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
248 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
261 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
261 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
------ ----------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------
Line src/Tests/TetherStatsStorageTest.php
------ ----------------------------------------------------------------------------------
28 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
28 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
39 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
39 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
50 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
50 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
103 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Component\Render\FormattableMarkup.
103 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
------ ----------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/Tests/TetherStatsTestBase.php
------ ------------------------------------------------------------------------------
139 Call to deprecated method url() of class Drupal\Core\Entity\EntityInterface:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
Please use toUrl() instead.
------ ------------------------------------------------------------------------------

------ --------------------------------------------------------------------------------------
Line src/TetherStatsDerivativeListBuilder.php
------ --------------------------------------------------------------------------------------
43 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
43 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
------ --------------------------------------------------------------------------------------

------ ---------------------------------------------------------------
Line src/TetherStatsIdentitySet.php
------ ---------------------------------------------------------------
228 Call to deprecated function entity_load():
in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the
entity type storage's load() method.
------ ---------------------------------------------------------------

------ --------------------------------------------------------------------------------------
Line src/TetherStatsManager.php
------ --------------------------------------------------------------------------------------
262 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
262 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
268 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
268 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
275 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
275 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
281 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
281 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
287 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
287 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
288 Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
Will be removed before 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.
288 Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
Will be removed before Drupal 9.0.0. Use the appropriate
------ --------------------------------------------------------------------------------------

[ERROR] Found 64 errors

CommentFileSizeAuthor
#2 deprecated-methods-removed.patch23.06 KBSahana _N
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sahana _N created an issue. See original summary.

Sahana _N’s picture

Status: Active » Needs review
FileSize
23.06 KB
Kristen Pol’s picture

Issue tags: +Drupal 9 compatibility

Per 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.

  • rzan committed 12e3fed on 8.x-1.x
    Issue #3096549 by Sahana _N: Removed deprecated code for Drupal 9...
rzan’s picture

Status: Needs review » Fixed

Thank you Sahana_N,

I have applied your patch and some additional updates for Drupal 9 compatibility.

Be careful not to use FormattableMarkup::placeholderFormat outside of a FormattableMarkup extension as it is a protected method.

Best,

rzan

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.