Problem/Motivation
There are a few deprecated methods shown when checking with "drupal-check" utility:
111/111 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------------------------------------------------------------------------
Line entity_browser_testing/web/modules/contrib/entity_browser/src/Plugin/EntityBrowser/FieldWidgetDisplay/ImageThumbnail.php
------ --------------------------------------------------------------------------------------------------------------------------
98 Call to deprecated method isSubclassOf() of class Drupal\Core\Entity\EntityTypeInterface.
------ --------------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------------------
Line entity_browser_testing/web/modules/contrib/entity_browser/tests/src/Functional/EntityBrowserUITest.php
------ --------------------------------------------------------------------------------------------------------
70 Call to deprecated method getUsername() of class Drupal\user\Entity\User.
------ --------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------
Line entity_browser_testing/web/modules/contrib/entity_browser/tests/src/Functional/EntityBrowserUpdateHookTest.php
------ ----------------------------------------------------------------------------------------------------------------
43 Call to deprecated method assertRaw() of class Drupal\Tests\BrowserTestBase.
44 Call to deprecated method assertRaw() of class Drupal\Tests\BrowserTestBase.
56 Call to deprecated method assertEqual() of class Drupal\Tests\BrowserTestBase.
67 Call to deprecated method assertEqual() of class Drupal\Tests\BrowserTestBase.
------ ----------------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] Found 6 errors
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | entity-browser-drupal-check-3042583-9.patch | 3.33 KB | oknate |
| #9 | 3042583--interdiff-6-9.txt | 2.14 KB | oknate |
Comments
Comment #2
sergiu stici commentedHere is the patch, please review.
Comment #3
oknateWe don't want to change the deprecated class. This is for backwards compatibility. The rest of the patch looks fine, as a start.
Comment #4
oknateComment #5
oknateComment #6
oknateHere's an updated patch. The last patch, #2 was actually fine, except for changing the deprecated class. It just missed one:
Adding that one.
Comment #7
oknateComment #8
berdirThis is the wrong method, as the token, based on the comment above is account name, not token name. By default, they are the same, but display name runs through an alter hook and could be changed.
"( '", unnecessary space.
same.
Comment #9
oknateThanks! I should have run it through my coder linter. And thanks for pointing out that it should be getAccountName() not getDisplayName().
Comment #10
berdirComment #13
oknateCommitted, thanks!
Comment #14
oknate