akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
81 stars 88 forks source link

Parse error in module-magento2-connector-community/Job/Attribute.php on line 566 #644

Open pixelhed opened 1 year ago

pixelhed commented 1 year ago

When executiing bin/magento akeneo_connector:import --code={anycode_here} there is an error

Parse error: syntax error, unexpected ')', expecting '|' or variable (T_VARIABLE) in /path/to/magento/vendor/akeneo/module-magento2-connector-community/Job/Attribute.php on line 566

Environment and configuration

PHP version: 7.4 Magento version: 2.3.7-p2 module version: 103.4.3

Steps to reproduce

  1. run command bin/magento akeneo_connector:import --code={anycode_here}

Expected result

Import runs correctly

Actual result

parse error occurs

joachimVT commented 1 year ago

Having the same issue when trying to run bin/magento setup:di:compile. PHP versions prior to 8.0 will raise a fatal error with the new syntax: } catch (Exception) {}

antoniocarboni commented 1 year ago

I have same issue. Fixed temporarily with this: https://github.com/akeneo/magento2-connector-community/pull/645 thanks @pixelhed :)