Problem/Motivation

While using this module I recieved

Deprecated function: Drupal\commerce_custom_checkout_message\Plugin\Commerce\CheckoutPane\CustomCheckoutMessage::create(): Implicitly marking parameter $checkout_flow as nullable is deprecated, the explicit nullable type must be used instead in include() (line 576 of /app/vendor/composer/ClassLoader.php).

Steps to reproduce

Navigate to /admin/commerce/config/checkout-flows/manage/default
move Custom checkout message pane to a workflow state from disabled
click save
observe the message.

Proposed resolution

Add ? to places it's required throughout the module.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

generalredneck created an issue. See original summary.

generalredneck’s picture

Ran phpcs to find all the instances..

FILE: ...stom_checkout_message/src/Plugin/Commerce/CheckoutPane/CustomCheckoutMessage.php
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
 58 | ERROR | [x] Parameter $checkout_flow has null default value, but is not marked
    |       |     as nullable.
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------

Time: 161ms; Memory: 10MB

generalredneck’s picture

Status: Active » Needs review

phpcs now runs with the output


No violations were found

Time: 151ms; Memory: 10MB
dhruv.mittal’s picture

Reviewing it

dhruv.mittal’s picture

Status: Needs review » Reviewed & tested by the community

Changes looks good to me and as There are no deprecation warning, so moving it to RTBC !!