-4

when i put this in cmd : composer require server --dev

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in C:\Users\user\monprojet\vendor\symfony\flex\src\Command\DumpEnvCommand.php on line 84

gp_sflover
  • 3,460
  • 5
  • 38
  • 48
  • Does this answer your question? [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) and [PHP parse/syntax errors; and how to solve them](https://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – gp_sflover Sep 18 '22 at 14:36

1 Answers1

0

There's no sufficient information in your question, yet as the issue is in your vendor/ folder, which is usually not your code, I wonder is there any chance you are using older PHP version now comparing to what you you used to install the vendor packages? Or maybe you copied the whole project structure (incl. vendor/) from elsewhere and you are simply now facing code that is too new for that version? I'd peek what's in \vendor\symfony\flex\src\Command\DumpEnvCommand.php on line 84 to confirm that. Alternatively just wipe whole vendor/ folder and let composer reinstall the packages.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141