#3040425: Fix logger usage in PaymentMethodAddForm and PaymentMethodEditForm introduced a logger.channel.commerce_payment service. Let's inject it into the PaymentProcess checkout pane and the PaymentCheckoutController instead of using \Drupal::logger.

CommentFileSizeAuthor
#2 3040432-2-inject-logger.patch6.14 KBzaporylie

Comments

bojanz created an issue. See original summary.

zaporylie’s picture

Status: Active » Needs review
StatusFileSize
new6.14 KB

Quick patch.

bojanz’s picture

Status: Needs review » Needs work
FILE: ...erce/commerce/modules/payment/src/Controller/PaymentCheckoutController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 41 | ERROR | [x] Do not append variable name "$logger" to the type declaration
    |       |     in a member variable comment
    |       |     (Drupal.Commenting.VariableComment.InlineVariableName)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...mmerce/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 46 | ERROR | Parameter $logger is not described in comment
    |       | (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
--------------------------------------------------------------------------------

  • bojanz committed 41f5000 on 8.x-2.x authored by zaporylie
    Issue #3040432 by zaporylie: Replace \Drupal::logger() usage in...
bojanz’s picture

Status: Needs work » Fixed

Fixed on commit, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.