------ -----------------------------------------------------------------------
Line manage_display/src/Plugin/Field/FieldFormatter/SubmittedFormatter.php
------ -----------------------------------------------------------------------
127 Call to deprecated function user_view():
in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal::entityTypeManager()->getViewBuilder('user')->view() instead.
------ -----------------------------------------------------------------------
FILE: manage_display/src/Plugin/Field/FieldFormatter/SubmittedFormatter.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
108 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| manage_display_drupal9.patch | 1.35 KB | sleitner |
Comments
Comment #2
adamps commentedThanks @sleitner the fix looks good to me. The test was passing on D9 so I guess it doesn't call that line containing
user_view(). Therefore we can't rely on the tests to confirm that the fix is working.Did you test it on your local site?
Comment #3
sleitner commentedYes I tested it on my local site. I found another error in the test files (wrong filename and class name).
Comment #4
adamps commentedThanks. However this issue is about D9 compatibility. If you want to fix coding standards then please use #2995881: Coding standard.
I am willing to commit your first patch on this issue.
Comment #6
adamps commented