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
------ -----------------------------------------------------------------------
Line src/Tests/TokenFieldUiTest.php
------ -----------------------------------------------------------------------
91 Call to deprecated function entity_get_form_display().
263 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
268 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
273 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
277 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
------ -----------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------
Line src/Tests/TokenTestTrait.php (in context of class Drupal\Tests\token\Kernel\KernelTestBase)
------ ---------------------------------------------------------------------------------------------
34 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
106 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
------ ---------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line tests/src/Kernel/CommentTest.php
------ ---------------------------------------------------------------------
65 Call to deprecated method url() of class Drupal\Core\Entity\Entity.
------ ---------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------
Line tests/src/Kernel/EntityTest.php
------ -----------------------------------------------------------------------------------------
47 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
48 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
49 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
50 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
51 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
52 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
53 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
54 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
55 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
56 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
63 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
64 Call to deprecated method assertIdentical() of class Drupal\KernelTests\KernelTestBase.
------ -----------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------
Line tests/src/Kernel/FieldTest.php
------ -------------------------------------------------------------------------------------
265 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
266 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
267 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
269 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
270 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
308 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
309 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
310 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
311 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
340 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
341 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
342 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
343 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
344 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
347 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
348 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
350 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
351 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
390 Call to deprecated function entity_get_display().
503 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
510 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
516 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
523 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
------ -------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------
Line tests/src/Kernel/RandomTest.php
------ --------------------------------------------------------------------------------------------
24 Call to deprecated method assertNotIdentical() of class Drupal\KernelTests\KernelTestBase.
------ --------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------
Line tests/src/Kernel/UnitTest.php
------ -------------------------------------------------------------------------------------
106 Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.
115 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
116 Call to deprecated method getTokenInfo() of class Drupal\token\Token.
------ -------------------------------------------------------------------------------------
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff_14-15.txt | 1.44 KB | Matroskeen |
#15 | token_deprecated-3042568-15.patch | 16.54 KB | Matroskeen |
#14 | token_deprecated-3042568-14.patch | 15.3 KB | Berdir |
| |||
#13 | token_deprecated-3042568-12.patch | 14.82 KB | Berdir |
#5 | token_deprecated-3042568-5.patch | 3.64 KB | Sergiu Stici |
|
Comments
Comment #2
thallesFollow the patch!
Comment #4
volegerMark #3045247: Replace deprecated assertEqual() with assertEquals() as related
Better to make this issue as a meta issue and do exact replacements in the child issue. See #3045247: Replace deprecated assertEqual() with assertEquals()
Comment #5
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedI run
Comment #6
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedComment #7
BerdirThanks, but Drupal 8.8 has a better replacement for entity_get_form_display() and the file functions are only in 8.7/8.8, so we'll update them later when 8.6 is no longer supported. There are already dedicated issues for them.
Comment #8
robpowell@berdir can we link to the dedicated issues? And is this postponed till 8.6 support is finished which seems to mean January 2020? https://www.drupal.org/core/release-cycle-overview
Comment #9
idebr CreditAttribution: idebr at iO commentedComment #10
kim.pepper8.6 is no longer supported so changing status to active.
Comment #11
BerdirAll the 8.7 stuff is done, only 8.8 remaining, so back to Postponed ;)
Comment #13
BerdirThis should take care of all the remaining deprecations.
Comment #14
BerdirMissed on call.
Comment #15
MatroskeenassertIdentical()
andassertNotIdentical()
are not deprecated yet, but they will be soon.Let's be ahead of the game and prevent one more issue with deprecation report in the near future :)
Comment #16
maximpodorov CreditAttribution: maximpodorov commentedThe patch for the 8.x-1.6 version of the module (the same as in #15).
Comment #17
Abhijith S CreditAttribution: Abhijith S at Zyxware Technologies commentedPatch #16(token_deprecated-3042568-15-1.6.patch) not working.Please fix it.
The error I was getting is given below.
git apply token_deprecated-3042568-15-1.6.patch
error: patch failed: token.info.yml:1
error: token.info.yml: patch does not apply
Comment #18
BerdirThat patch isn't supposed to apply, it is for 8.x-1.6. Which doesn't really make sense, because there is no practical reason to apply this patch to a released version and include it in a project. This doesn't fix any problems on Drupal 8.
Comment #19
John Cook CreditAttribution: John Cook at Creode commentedI've checked the patch from #15. The code all looks good.
After applying the patch, I get the following report from drupal-check:
So all deprications have been fixed.
I've got one small nit-pick. There is a typo in:
But this can be fix on commit, so marking RTBC for #15
Comment #20
DamienMcKennaComment #22
BerdirCommitted, that means token 1.x-dev will now require Drupal 8.8.
Comment #23
maximpodorov CreditAttribution: maximpodorov commentedIt's not fair that I was credited in this commit.
Comment #24
BerdirWell, that's the first time I hear someone complaining that they *did* get credited :)
Too late for that, at least for the commit message.