-2

Syntax error, unexpected '|', expecting variable (T_VARIABLE) for PHP Spreadsheet ?

I want to put minimum requirement of PHP version is 7.3 but some unknown reason, it will gives us syntax error from vendor/psr/simple-cache/src/CacheInterface.php on line 34

To overcome this issue, I have used a command composer--ignore-platform-reqs to stop platform-reqs.php file checking, but same issue is appearing every-time.

also updated the composer.json file as require data, nothing is happening !

  • What version of PHP *are* you using? – aynber May 20 '22 at 19:37
  • The error is coming from `simple-cache`,not PHPSpreadsheet. SimpleCache has a min requirement of PHP 8 for a reason. – aynber May 20 '22 at 19:38
  • Using 8.0 but I want to set minimum requirement is 7.3. Is it possible? – iamavijitdas May 20 '22 at 19:54
  • If you want to set the minimum requirement to an older PHP version, you will need to update your dependencies to use older versions that were compatible with that older PHP version. `phpoffice/phpspreadsheet` version 1.22.0 and older should work. Newer versions might also work if you force the `psr/simple-cache` dependency to a 1.0 version in your own composer.json file, but phpspreadsheet might not work correctly if you do that. – rickdenhaan May 20 '22 at 22:00

0 Answers0