1

Im trying use the command bin/magento setup:upgrade in magento 2.1.2 on macOS but the terminal show this error:

Parse error: parse error in /Applications/MAMP/htdocs/Magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

How can solved this?

0

1 Answer 1

0

Mentioned line contains a splat operator which unpacks values from the array into the list of method arguments:

return new $type(...array_values($args));

If you are getting parse error there, it may be that you use too old PHP version.

Check what version you have installed by running this command in the terminal:

php -v

The minimal supported version for Magento 2.1.2 is PHP 5.6.5:

http://devdocs.magento.com/guides/v2.1/install-gde/system-requirements-2.1-tech.html

You need to upgrade PHP on your local environment and it should work then.

2
  • Im using PHP 7 the most recent in MAMP
    – victor
    Commented Nov 7, 2016 at 5:45
  • @victor thanks, could you show output of "php -v" command mentioned in my answer? Commented Nov 7, 2016 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.