craftcms/commerce-stripe

ParseError when updating to 2.4.4

Closed this issue · 5 comments

Description

Updated plugin from 2.4.3 to 2.4.4 a couple of days ago. Now, when I test putting a transaction through I get the following error:

ParseError
syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)

referencing line 23 of in /app/craft/vendor/craftcms/commerce-stripe/src/events/PaymentIntentConfirmationEvent.php

Looks like it's something to do with the array type hint on that line? Worth noting that this is running on PHP 7.2.

Steps to reproduce

  1. Have Craft running on PHP 7.2 and update this plugin to 2.4.4
  2. Attempt to put transaction through using Stripe gateway
  3. See error

Additional info

  • Craft CMS version: 3.7.63.1
  • Stripe for Craft Commerce version: 2.4.4
  • PHP version: 7.2.34
  • Database driver & version: MySQL 5.7.35
  • Plugins & versions:

AsyncQueue 2.3.0
Category Groups Field 1.3.0
Colour Swatches 1.7.0
Cookies 1.1.15
Craft Commerce 3.4.19
Disqus 1.1.3
Element API 2.8.6.1
Environment Label 3.2.0
Events 1.4.24
Freeform 3.13.22.1
Navigation 1.4.31
oEmbed 1.13.19
PDF Transform 1.0.9
Read Only 1.0.1
Reasons 2.3.1
Redactor 2.10.11
Redirect Manager 1.1.1
Section Field 1.1.0
SEOmatic 3.4.48
Stripe for Craft Commerce 2.4.4
Super Table 2.7.4
Tags 1.0.9
User Group Field 2.0.2

I have just encountered the same issue on PHP 7.3

@seb-jones Craft Commerce has a minimum PHP requirement of 7.2.5+. Would it be possible to upgrade your PHP version to see if that fixes the issue?

@pdaleramirez Sorry, I think you might have misread my comment - we are using PHP 7.3. It looks like @paulgoodfield is using PHP 7.2.34 though.

@pdaleramirez Do you have an expected release date for the fix for this bug? One of my clients is also affected by the bug - they are using PHP 7.3.31.

This has now been fixed in 2.4.4.1 which has just been released.

Thanks.