When using PHP 8.4 (using Drupal 10.6.x and drupal/commerce 2.40.0), noticing the following PHP deprecation error:

Deprecated: Drupal\commerce_cart\CartProvider::createCart(): Implicitly marking parameter $store as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/docroot/modules/contrib/commerce/modules/cart/src/CartProvider.php on line 78

Issue fork commerce-3601244

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

andreastkdf created an issue. See original summary.

andreastkdf’s picture

Status: Active » Needs review
andreastkdf’s picture

Assigned: andreastkdf » Unassigned
vinodhini.e’s picture

Hi, Tested this issue on Drupal 10.6.10 and encountered the same deprecation warning.

Applied patch #703 and verified that the PHP 8.4 deprecation issue is resolved.

Thanks.

  • andreastkdf committed b17b6a7f on 8.x-2.x
    #3601244: fix deprecated nullable parameters errors
    
jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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