-
-
Notifications
You must be signed in to change notification settings - Fork 68
Deprecation Error Solutions
Joseph D. Purcell edited this page Mar 25, 2019
·
11 revisions
- drupal_set_message
- \Drupal::service('messenger')->addMessage(....) is a replacement for drupal_set_message in .module files, but in classes, the messenger service should be injected.
- For any form class that inherits FormBase (or any other class that inherits MessengerTrait), replace drupal_set_message with $this->messenger->addMessage
- Use method addError for drupal_set_message(..., ‘error’), addWarning for drupal_set_message(..., ‘warning’), etc. See the API docs
- Call to deprecated function entity_view().
- @todo
- Call to deprecated function entity_get_display().
- @todo
- Call to deprecated function entity_get_form_display().
- @todo
- Call to deprecated method assertIdentical(), assertEqual(), assertNoText(), assertFieldByXPath(), of class Drupal\KernelTests\KernelTestBase.
- @todo
- Call to method [METHOD NAME] of deprecated class Drupal\Tests\BrowserTestBase.
- @todo
- Class [CLASS NAME] not found and could not be autoloaded.
- @todo
- Usage of deprecated trait [CLASS NAME] in class [CLASS NAME]
- @todo