Ingenico-ePayments / connect-extension-magento2

Ingenico Connect based Shopping Cart Extension for Magento 2.x
https://epayments.developer-ingenico.com/documentation/ecommerce-extensions/magento-2/
MIT License
4 stars 4 forks source link

2.4.2 release: syntax error unexpected 'LoggerInterface' #17

Closed sergiuec closed 3 years ago

sergiuec commented 3 years ago

on setup:upgrade throws error: PHP Parse error: syntax error, unexpected 'LoggerInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /var/www/html/vendor/ingenico-epayments/connect-extension-magento2/Logger/FrontendLogger.php on line 15

PHP 7.3.11 (cli) (built: Oct 25 2019 03:02:24) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies

Reproducible on clean Magento 2.3.5 instance.

sergiuec commented 3 years ago

I found the issue: the runtime-enforced type annotations for declared properties aren't supported in php 7.3 and earlier (https://wiki.php.net/rfc/typed_properties_v2). This mean that if you want to abandon on 2.4.1 version of the module all users who uses php 7.3 you MUST specify in composer.json the dependency on php 7.4.

kanduvisla commented 3 years ago

Thanks @sergiuec for pointing this out. We'll pick this up.

kanduvisla commented 3 years ago

Hi @sergiuec , this issue has been resolved in version 2.4.3 of the module.

We've also updated our automated test suite to make sure that something like this will not happen again.

Please note that in Magento's own release schedule, if you take the 2021 Q2 2.3.x release line, you must update to PHP 7.4 since PHP 7.3 reaches end-of-life in December 2021. This means that as soon as Magento 2.3.x no longer supports PHP 7.3, the Ingenico module will follow this and also stop supporting PHP 7.3.

sergiuec commented 3 years ago

that's great! thank you very much!