magento2: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) - Magento 2.3

Preconditions

  • Magento 2.3-alpha57
  • PHP 7.1.19
  • MySQL 5.7

Steps to reproduce

Magento 2.3 was working, but after upgrading to the latest alpha release Magento has the following error: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in .../vendor/magento/framework/Filesystem/Directory/Write.php on line 35

There is a question mark before PathValidatorInterface and is added on the 13th of July. https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/Filesystem/Directory/Write.php

After removing the question mark for testing, I get the same error in …/vendor/magento/framework/Filesystem/Directory/Read.php on line 54 and after removing that one I get the same error on line 71 and so on.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 42 (24 by maintainers)

Most upvoted comments

It works with php 7.2.* ( I was reporting just to add info to the issue) thanks!