drupal-console
drupal-console copied to clipboard
D9 Deprecated function call to getUsername in DatabaseLogBase:221
D9 Deprecated function call to getUsername in DatabaseLogBase:221 used by command:LogPollCommand
Problem
The issue appeared in the LogPollCommand but in reality it lies in it's parent "DatabaseLogBase". In DatabaseLogBase:221 a call to the getUsername function is made. Looking at Drupal\user\Entity\User::getUsername() I see:
in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use \Drupal\Core\Session\AccountInterface::getAccountName() or \Drupal\user\UserInterface::getDisplayName() instead.
Hope we can integrate the above mentioned change so that, probably one of the most underappreciated commands, is functional again.
- Drupal version: Spotted in 9.0.9 but should be an issue in earlier versions as well.
- Console version: 1.9.7.
- Console Launcher: 1.9.7.
- Steps to reproduce: Just run the database:log:poll command.
Best Regards, Marios.