Problem/Motivation

Running command

drupal-check -d modules/contrib/commerce_payu_india

generates following report :

3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------
  Line   src/Plugin/Commerce/PaymentGateway/CommercePayUIndia.php
 ------ ------------------------------------------------------------------------------
  96     \Drupal calls should be avoided in classes, use dependency injection instead
  100    Call to deprecated function drupal_set_message():
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
  107    Access to deprecated property $entityId of class
         Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayBase:
         in commerce:8.x-2.16 and is removed from commerce:3.x.
         Use $this->parentEntity->id() instead.
  115    Call to deprecated function drupal_set_message():
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
  124    Call to deprecated function drupal_set_message():
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
 ------ ------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------
  Line   src/PluginForm/CommercePayUIndiaRedirect/PaymentCommercePayUIndiaForm.php
 ------ ------------------------------------------------------------------------------
  31     \Drupal calls should be avoided in classes, use dependency injection instead
  47     \Drupal calls should be avoided in classes, use dependency injection instead
  51     Array has 2 duplicate keys with value 'hash' ('hash', 'hash').
 ------ ------------------------------------------------------------------------------


  [ERROR] Found 8 errors

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 drupal_9_readiness-3139304-2.patch8.16 KBvatsalkhanna

Comments

panshulk created an issue. See original summary.

vatsalkhanna’s picture

Assigned: panshulk » Unassigned
Status: Active » Needs review
StatusFileSize
new8.16 KB

Here's the patch for the deprecated code.